diff options
author | mnandri <mnandri@eunglick.corporate.thoughtworks.com> | 2015-12-16 18:26:31 +0100 |
---|---|---|
committer | mnandri <mnandri@eunglick.corporate.thoughtworks.com> | 2015-12-18 11:22:34 +0100 |
commit | 39fa6e68fc2afaafc0e8440d212b464d2e20c326 (patch) | |
tree | 03d090f7178a2d93a9c33cd072b0ff33fd9bd545 /service/pixelated/resources | |
parent | 338498cef1cd4f2b9ae49bc54bd496de0e5472a0 (diff) |
fixing unit test -- again WIP
Diffstat (limited to 'service/pixelated/resources')
-rw-r--r-- | service/pixelated/resources/attachments_resource.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/service/pixelated/resources/attachments_resource.py b/service/pixelated/resources/attachments_resource.py index 2b5a6912..911fc43d 100644 --- a/service/pixelated/resources/attachments_resource.py +++ b/service/pixelated/resources/attachments_resource.py @@ -87,12 +87,13 @@ class AttachmentsResource(Resource): '</body></html>' def render_POST(self, request): - fields = cgi.FieldStorage(fp=request.content, headers=request.headers, environ={'REQUEST_METHOD':'POST'}) + fields = cgi.FieldStorage(fp=request.content, headers=(request.getAllHeaders()), + environ={'REQUEST_METHOD': 'POST'}) _file = fields['attachment'] deferred = defer.maybeDeferred(self.mail_service.attachment_id, _file.value, _file.type) def send_location(attachment_id): - request.headers['Location'] = '/%s/%s'% (self.BASE_URL, attachment_id) + request.headers['Location'] = '/%s/%s' % (self.BASE_URL, attachment_id) respond_json_deferred({"attachment_id": attachment_id}, request, status_code=201) def error_handler(error): |