From 082d6a133a892226e6436aab26dd61f759cad30e Mon Sep 17 00:00:00 2001 From: Roald de Vries Date: Thu, 1 Dec 2016 18:25:11 +0100 Subject: fix csrf in retrieve attachment test --- 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 e5d42505..0bc2eacb 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -372,8 +372,9 @@ class AppTestClient(object): defer.returnValue((res, req)) @defer.inlineCallbacks - def post_attachment(self, data, headers): - deferred_result, req = self.post('/attachment', body=data, headers=headers) + def post_attachment(self, data, headers, session): + csrf = IPixelatedSession(session).get_csrf_token() + deferred_result, req = self.post('/attachment', body=data, headers=headers, csrf=csrf, session=session) res = yield deferred_result defer.returnValue((res, req)) -- cgit v1.2.3