summaryrefslogtreecommitdiff
path: root/service/test/support
diff options
context:
space:
mode:
authorRoald de Vries <rdevries@thoughtworks.com>2016-12-01 18:30:25 +0100
committerRoald de Vries <rdevries@thoughtworks.com>2016-12-01 18:30:25 +0100
commit688a8b42e8ab7c6d4529b6dda66f40eead07ad02 (patch)
treed95e41cd62f5e6c6b38da5381f084b1cc1e1a79e /service/test/support
parent082d6a133a892226e6436aab26dd61f759cad30e (diff)
fix csrf in tags tests
Diffstat (limited to 'service/test/support')
-rw-r--r--service/test/support/integration/app_test_client.py5
1 files changed, 3 insertions, 2 deletions
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):