From 590c52d0fc385e360fbc9459485185c69c75d90b Mon Sep 17 00:00:00 2001 From: Christophe Chauvet Date: Tue, 13 Jan 2026 22:18:10 +0100 Subject: [PATCH] test: test both parameter --- modoboa/webmail/tests/test_lib_imaputils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modoboa/webmail/tests/test_lib_imaputils.py b/modoboa/webmail/tests/test_lib_imaputils.py index 1a7a1e03f..b43391f2c 100644 --- a/modoboa/webmail/tests/test_lib_imaputils.py +++ b/modoboa/webmail/tests/test_lib_imaputils.py @@ -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")]