diff --git a/tests/unit/filter/test_lucene_filter.py b/tests/unit/filter/test_lucene_filter.py index cd03b8792..67764b0cb 100644 --- a/tests/unit/filter/test_lucene_filter.py +++ b/tests/unit/filter/test_lucene_filter.py @@ -458,7 +458,7 @@ def test_create_filter_error(self, testcase, input_str, message): def test_creates_lucene_compliance_filter_two_matching_regex_keys_of_two(self): lucene_filter = LuceneFilter.create( - 'regex_key_one: "/.*value.*/" AND regex_key_two: "/.*value.*/"', + 'regex_key_one: /.*value.*/ AND regex_key_two: /.*value.*/', ) assert lucene_filter == And( @@ -466,38 +466,21 @@ def test_creates_lucene_compliance_filter_two_matching_regex_keys_of_two(self): RegExFilterExpression(["regex_key_two"], ".*value.*"), ) - def test_creates_lucene_compliance_filter_one_regex_key(self): + def test_creates_StringFilter_not_Regex(self): lucene_filter = LuceneFilter.create( 'regex_key_one: "/.*value.*/"', ) - assert lucene_filter == RegExFilterExpression(["regex_key_one"], ".*value.*") - - def test_creates_lucene_compliance_filter_one_matching_one_missmatch_regex_key_of_two(self): - lucene_filter = LuceneFilter.create( - 'regex_key_one: "/.*value.*/" AND key_two: "value"', - ) - - assert lucene_filter == And( - RegExFilterExpression(["regex_key_one"], ".*value.*"), - StringFilterExpression(["key_two"], "value"), - ) + assert lucene_filter == StringFilterExpression(["regex_key_one"], "/.*value.*/") def test_new_lucene_compliance(self): - lucene_filter = LuceneFilter.create( - 'regex_key_one:".*value.*"' - ) - - assert lucene_filter == RegExFilterExpression(["regex_key_one"], ".*value.*") - - def test_new_lucene_compliance2(self): lucene_filter = LuceneFilter.create( 'regex_key_one:/.*value.*/' ) assert lucene_filter == RegExFilterExpression(["regex_key_one"], ".*value.*") - def test_new_lucene_compliance3(self): + def test_creates_lucene_compliance_filter_one_matching_one_missmatch_regex_key_of_two2(self): lucene_filter = LuceneFilter.create( 'regex_key_one:/.*value.*/ AND key_two: "/.*value.*/"', )