def testAndNodeWithMatch(self): qs = TagsIndex.objects.match(sphinx_escape(self.query)).filter(id__gt=2) self.assertQueryExecuted(qs)
def testNotEqual(self): qs = TagsIndex.objects.match(sphinx_escape(self.query)).notequal(id=4) self.assertQueryExecuted(qs)
def testMatchEscaping(self): qs = TagsIndex.objects.match(sphinx_escape(self.query)) self.assertQueryExecuted(qs)
def testAndNodeWithMatch(self): qs = TagsIndex.objects.match(sphinx_escape( self.query)).filter(id__gt=2) self.assertQueryExecuted(qs)
def testSphinxEscape(self): query = "Conan O'Brien" expected = "Conan O\\'Brien" # real expected value == "Conan O\'Brien" self.assertEqual(expected, sphinx_escape(query))