Esempio n. 1
0
 def testAndNodeWithMatch(self):
     qs = TagsIndex.objects.match(sphinx_escape(self.query)).filter(id__gt=2)
     self.assertQueryExecuted(qs)
Esempio n. 2
0
 def testNotEqual(self):
     qs = TagsIndex.objects.match(sphinx_escape(self.query)).notequal(id=4)
     self.assertQueryExecuted(qs)
Esempio n. 3
0
 def testMatchEscaping(self):
     qs = TagsIndex.objects.match(sphinx_escape(self.query))
     self.assertQueryExecuted(qs)
Esempio n. 4
0
 def testNotEqual(self):
     qs = TagsIndex.objects.match(sphinx_escape(self.query)).notequal(id=4)
     self.assertQueryExecuted(qs)
Esempio n. 5
0
 def testAndNodeWithMatch(self):
     qs = TagsIndex.objects.match(sphinx_escape(
         self.query)).filter(id__gt=2)
     self.assertQueryExecuted(qs)
Esempio n. 6
0
 def testMatchEscaping(self):
     qs = TagsIndex.objects.match(sphinx_escape(self.query))
     self.assertQueryExecuted(qs)
Esempio n. 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))