summaryrefslogtreecommitdiff
path: root/service/test/support/integration/app_test_client.py
diff options
context:
space:
mode:
authorRoald de Vries <rdevries@thoughtworks.com>2016-12-01 18:25:11 +0100
committerRoald de Vries <rdevries@thoughtworks.com>2016-12-01 18:25:11 +0100
commit082d6a133a892226e6436aab26dd61f759cad30e (patch)
treed43d844b5eee9b1543b985c4a6d336e7efad2dd2 /service/test/support/integration/app_test_client.py
parent05551265c641ac51d897a49e35f390fde7bc4d8c (diff)
fix csrf in retrieve attachment test
Diffstat (limited to 'service/test/support/integration/app_test_client.py')
-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 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))