示例#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))