summaryrefslogtreecommitdiff
path: root/service/test/support
diff options
context:
space:
mode:
Diffstat (limited to 'service/test/support')
-rw-r--r--service/test/support/integration/app_test_client.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py
index 99f4ebc7..8ab58397 100644
--- a/service/test/support/integration/app_test_client.py
+++ b/service/test/support/integration/app_test_client.py
@@ -322,8 +322,13 @@ class AppTestClient(object):
defer.returnValue(mails)
@defer.inlineCallbacks
- def get_attachment(self, ident, encoding):
- deferred_result, req = self.get("/attachment/%s" % ident, {'encoding': [encoding]}, as_json=False)
+ def get_attachment(self, ident, encoding, filename=None, content_type=None):
+ params = {'encoding': [encoding]}
+ if filename:
+ params['filename'] = [filename]
+ if content_type:
+ params['content_type'] = [content_type]
+ deferred_result, req = self.get("/attachment/%s" % ident, params, as_json=False)
res = yield deferred_result
defer.returnValue((res, req))