mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
test: test both parameter
This commit is contained in:
@@ -19,8 +19,15 @@ class ImapUtilsTestCase(unittest.TestCase):
|
||||
result = [bytearray('(FROM "bob")', "utf8")]
|
||||
self.assertEqual(self.imap_connector.criterions, result)
|
||||
|
||||
def test_criterions_both_criterion_with_pattern(self):
|
||||
"""Test with both Criterion and pattern"""
|
||||
self.imap_connector.criterions = []
|
||||
self.imap_connector.parse_search_parameters("both", "bob")
|
||||
result = [bytearray('(FROM "bob") OR (SUBJECT "bob")', "utf8")]
|
||||
self.assertEqual(self.imap_connector.criterions, result)
|
||||
|
||||
def test_criterions_one_criterion_without_pattern(self):
|
||||
"""Test with Criterion and pattern"""
|
||||
"""Test with Criterion and empty pattern"""
|
||||
self.imap_connector.criterions = []
|
||||
self.imap_connector.parse_search_parameters("SEEN", "")
|
||||
result = [bytearray("ALL", "utf8")]
|
||||
|
||||
Reference in New Issue
Block a user