From dac74cc8cabdc5e3ad0e90fc9aff3b6beedc964f Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Wed, 10 Feb 2016 17:27:15 +0100 Subject: Fix Issue #596: Provide correct content-type Provide the proper content-type Quote filename due to Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=221028 --- service/test/support/integration/app_test_client.py | 9 +++++++-- 1 file changed, 7 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 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)) -- cgit v1.2.3