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