diff --git a/tests/xapian_tests/tests/xapian_query.py b/tests/xapian_tests/tests/xapian_query.py index db6e7b0..ea5eb46 100644 --- a/tests/xapian_tests/tests/xapian_query.py +++ b/tests/xapian_tests/tests/xapian_query.py @@ -70,12 +70,11 @@ class XapianSearchQueryTestCase(TestCase): self.sq.add_filter(SQ(content='hello') | SQ(content='world')) self.assertEqual(self.sq.build_query().get_description(), 'Xapian::Query((hello OR world))') - # def test_build_query_multiple_words_mixed(self): - # self.sq.add_filter('content', 'why') - # self.sq.add_filter('content', 'hello', use_or=True) - # self.sq.add_filter('content', 'world', use_not=True) - # self.assertEqual(self.sq.build_query(), 'why OR hello NOT world') - # + def test_build_query_multiple_words_mixed(self): + self.sq.add_filter(SQ(content='why') | SQ(content='hello')) + self.sq.add_filter(~SQ(content='world')) + self.assertEqual(self.sq.build_query().get_description(), 'Xapian::Query(((why OR hello) AND ( AND_NOT world)))') + # def test_build_query_phrase(self): # self.sq.add_filter('content', 'hello world') # self.assertEqual(self.sq.build_query(), '"hello world"')