diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-09-02 12:35:33 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-09-02 12:35:33 +0200 |
commit | e5d718f982e0cd3fc85da00d3abdccce1907e488 (patch) | |
tree | ebf566a96a2b70c7f234c81065ee48054bf555a3 /service/test/unit/adapter/mailstore | |
parent | 503c917ede122fc97046e35af8ec30a25adbad32 (diff) |
Download attachments from mail store instead of querier
- Issue #435
- Improved error handling of attachment resource
Diffstat (limited to 'service/test/unit/adapter/mailstore')
-rw-r--r-- | service/test/unit/adapter/mailstore/test_leap_mailstore.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/service/test/unit/adapter/mailstore/test_leap_mailstore.py b/service/test/unit/adapter/mailstore/test_leap_mailstore.py index 7cbd1405..96a862be 100644 --- a/service/test/unit/adapter/mailstore/test_leap_mailstore.py +++ b/service/test/unit/adapter/mailstore/test_leap_mailstore.py @@ -137,7 +137,7 @@ class TestLeapMailStore(TestCase): @defer.inlineCallbacks def test_get_mail_attachment(self): attachment_id = 'AAAA9AAD9E153D24265395203C53884506ABA276394B9FEC02B214BF9E77E48E' - doc = ContentDocWrapper(content_type='foo/bar', raw='asdf') + doc = SoledadDocument(json=json.dumps({'content_type': 'foo/bar', 'raw': 'asdf'})) when(self.soledad).get_from_index('by-type-and-payloadhash', 'cnt', attachment_id).thenReturn(defer.succeed([doc])) store = LeapMailStore(self.soledad) @@ -153,8 +153,8 @@ class TestLeapMailStore(TestCase): ('quoted-printable', 'äsdf', '=C3=A4sdf')] for transfer_encoding, data, encoded_data in encoding_examples: - doc = ContentDocWrapper(content_type='foo/bar', raw=encoded_data, - content_transfer_encoding=transfer_encoding) + doc = SoledadDocument(json=json.dumps({'content_type': 'foo/bar', 'raw': encoded_data, + 'content_transfer_encoding': transfer_encoding})) when(self.soledad).get_from_index('by-type-and-payloadhash', 'cnt', attachment_id).thenReturn(defer.succeed([doc])) store = LeapMailStore(self.soledad) |