diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-17 14:46:39 +0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-17 14:46:39 +0200 |
commit | 790b641f5709bf5ac40c6c1151395ce7c18fa8fb (patch) | |
tree | 955d8a24c66e618ce88411abf6731fe2f1710ea9 /service/test | |
parent | 362040299d52a33a2cf61f0a6e1111ec70a5263b (diff) |
improving matching for filtering tags and fixing pep8 warnings
Diffstat (limited to 'service/test')
-rw-r--r-- | service/test/integration/search_test.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/service/test/integration/search_test.py b/service/test/integration/search_test.py index 04151b55..ac91f0b0 100644 --- a/service/test/integration/search_test.py +++ b/service/test/integration/search_test.py @@ -40,7 +40,7 @@ class SearchTest(unittest.TestCase, SoledadTestBase): self.assertTrue('important' in all_tag_names) def test_that_tags_are_filtered_by_query(self): - input_mail = MailBuilder().with_tags(['ateu', 'atoa', 'atado', 'zuado']).build_input_mail() + input_mail = MailBuilder().with_tags(['ateu', 'catoa', 'luat', 'zuado']).build_input_mail() self.add_mail_to_inbox(input_mail) all_tags = self.get_tags('?q=at&skipDefaultTags=true') @@ -48,8 +48,8 @@ class SearchTest(unittest.TestCase, SoledadTestBase): all_tag_names = [t['name'] for t in all_tags] self.assertEqual(3, len(all_tag_names)) self.assertTrue('ateu' in all_tag_names) - self.assertTrue('atoa' in all_tag_names) - self.assertTrue('atado' in all_tag_names) + self.assertTrue('catoa' in all_tag_names) + self.assertTrue('luat' in all_tag_names) def test_that_default_tags_are_ignorable(self): input_mail = MailBuilder().with_tags(['sometag']).build_input_mail() @@ -83,7 +83,7 @@ class SearchTest(unittest.TestCase, SoledadTestBase): first_page = self.get_mails_by_tag('inbox', page=1, window=1) self.assertEqual(len(first_page), 1) - + def test_search_mails_with_multiple_pages(self): input_mail = MailBuilder().build_input_mail() input_mail2 = MailBuilder().build_input_mail() @@ -108,4 +108,3 @@ class SearchTest(unittest.TestCase, SoledadTestBase): for tag in tags_count: if tag['name'] == mailbox: return tag['counts'] - |