Skip to content

Commit 3b9b758

Browse files
committed
added more test code
1 parent 1d4d9f5 commit 3b9b758

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_searcher.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ def test_add_property_filter_undef():
1313
assert "SUMMARY" not in s._property_filters
1414

1515

16+
def test_add_property_filter_contains():
17+
"""Adding an "undef" property filter should record the operator but
18+
not attempt to coerce the value through TypesFactory (since value is
19+
ignored for 'undef')."""
20+
s = Searcher()
21+
s.add_property_filter("SUMMARY", "rain", operator="contains")
22+
assert "SUMMARY" in s._property_operator
23+
assert s._property_operator["SUMMARY"] == "contains"
24+
assert "SUMMARY" in s._property_filters
25+
26+
1627
def test_add_property_filter_unsupported():
1728
"""Unsupported operators should raise NotImplementedError."""
1829
s = Searcher()

0 commit comments

Comments
 (0)