From 688a8b42e8ab7c6d4529b6dda66f40eead07ad02 Mon Sep 17 00:00:00 2001 From: Roald de Vries Date: Thu, 1 Dec 2016 18:30:25 +0100 Subject: fix csrf in tags tests --- service/test/support/integration/app_test_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'service/test/support') diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py index 0bc2eacb..4e3758c5 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -383,8 +383,9 @@ class AppTestClient(object): res, req = self.put('/mails', data, csrf=csrf, session=session) return res, req - def post_tags(self, mail_ident, tags_json): - res, req = self.post("/mail/%s/tags" % mail_ident, tags_json) + def post_tags(self, mail_ident, tags_json, session): + csrf = IPixelatedSession(session).get_csrf_token() + res, req = self.post("/mail/%s/tags" % mail_ident, tags_json, csrf=csrf, session=session) return res def get_tags(self, **kwargs): -- cgit v1.2.3