summaryrefslogtreecommitdiff
path: root/service/test/integration
diff options
context:
space:
mode:
authorFábio Pio <fpio@thoughtworks.com>2014-12-17 17:18:54 -0200
committerFábio Pio <fpio@thoughtworks.com>2014-12-17 17:21:52 -0200
commit129800847138e802040d4ad53adc06b9776ac1c6 (patch)
tree0ac419a91e4b9a71c3fabafc82f59d00343e4d4e /service/test/integration
parent8d71694e252aa517a696403327dae594b43744c0 (diff)
Fix issue #200 search works with base63 bodies
Now the search works with the decoded body too, instead of only with the raw mail
Diffstat (limited to 'service/test/integration')
-rw-r--r--service/test/integration/search_test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/service/test/integration/search_test.py b/service/test/integration/search_test.py
index 21326ec7..6deb4794 100644
--- a/service/test/integration/search_test.py
+++ b/service/test/integration/search_test.py
@@ -133,3 +133,12 @@ class SearchTest(SoledadTestBase):
results = self.get_mails_by_tag('inbox')
self.assertEqual(results[0].ident, input_mail2.ident)
self.assertEqual(results[1].ident, input_mail.ident)
+
+ def test_search_base64_body(self):
+ body = u'bl\xe1'
+ input_mail = MailBuilder().with_body(body.encode('utf-8')).build_input_mail()
+ self.client.add_mail_to_inbox(input_mail)
+ results = self.search(body)
+
+ self.assertGreater(len(results), 0, 'No results returned from search')
+ self.assertEquals(results[0].ident, input_mail.ident ) \ No newline at end of file