From 05551265c641ac51d897a49e35f390fde7bc4d8c Mon Sep 17 00:00:00 2001 From: Roald de Vries Date: Thu, 1 Dec 2016 18:20:38 +0100 Subject: fix csrf in mark as read/unread tests --- service/test/support/integration/app_test_client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 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 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): -- cgit v1.2.3