summaryrefslogtreecommitdiff
path: root/service/test/support
diff options
context:
space:
mode:
authorRoald de Vries <rdevries@thoughtworks.com>2016-12-01 18:20:38 +0100
committerRoald de Vries <rdevries@thoughtworks.com>2016-12-01 18:20:38 +0100
commit05551265c641ac51d897a49e35f390fde7bc4d8c (patch)
tree5f8cfcf65fb32da12f0e533795b22b17139733e9 /service/test/support
parent20b1922794d3179b32dd930706ec5693a3562464 (diff)
fix csrf in mark as read/unread tests
Diffstat (limited to 'service/test/support')
-rw-r--r--service/test/support/integration/app_test_client.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py
index f04f67fd..e5d42505 100644
--- a/service/test/support/integration/app_test_client.py
+++ b/service/test/support/integration/app_test_client.py
@@ -405,12 +405,14 @@ class AppTestClient(object):
res, req = self.post("/mails/delete", json.dumps({'idents': idents}), csrf=csrf, session=session)
return res
- def mark_many_as_unread(self, idents):
- res, req = self.post('/mails/unread', json.dumps({'idents': idents}))
+ def mark_many_as_unread(self, idents, session):
+ csrf = IPixelatedSession(session).get_csrf_token()
+ res, req = self.post('/mails/unread', json.dumps({'idents': idents}), csrf=csrf, session=session)
return res
- def mark_many_as_read(self, idents):
- res, req = self.post('/mails/read', json.dumps({'idents': idents}))
+ def mark_many_as_read(self, idents, session):
+ csrf = IPixelatedSession(session).get_csrf_token()
+ res, req = self.post('/mails/read', json.dumps({'idents': idents}), csrf=csrf, session=session)
return res
def get_contacts(self, query):