mirror of
https://github.com/Hopiu/xapian-haystack.git
synced 2026-04-08 09:10:59 +00:00
Fixed error that was causing test to pass due to assert(True).
This commit is contained in:
parent
b28a80b420
commit
59cd25789a
1 changed files with 5 additions and 4 deletions
|
|
@ -1,6 +1,3 @@
|
|||
# Copyright (C) 2009, 2010, 2011, 2012 David Sauve
|
||||
# Copyright (C) 2009, 2010 Trapeze
|
||||
|
||||
import datetime
|
||||
import os
|
||||
import shutil
|
||||
|
|
@ -155,7 +152,11 @@ class XapianSearchQueryTestCase(TestCase):
|
|||
self.assertEqual(str(self.sq.build_query()), u'Xapian::Query(((Zhello OR hello) AND 0 * XCONTENTTYPEcore.mockmodel))')
|
||||
|
||||
self.sq.add_model(AnotherMockModel)
|
||||
self.assertTrue(str(self.sq.build_query()) in u'Xapian::Query(((Zhello OR hello) AND (0 * XCONTENTTYPEcore.anothermockmodel OR 0 * XCONTENTTYPEcore.mockmodel)))' or u'Xapian::Query(((Zhello OR hello) AND (0 * XCONTENTTYPEcore.mockmodel OR 0 * XCONTENTTYPEcore.anothermockmodel)))')
|
||||
|
||||
self.assertTrue(str(self.sq.build_query()) in (
|
||||
u'Xapian::Query(((Zhello OR hello) AND (0 * XCONTENTTYPEcore.anothermockmodel OR 0 * XCONTENTTYPEcore.mockmodel)))',
|
||||
u'Xapian::Query(((Zhello OR hello) AND (0 * XCONTENTTYPEcore.mockmodel OR 0 * XCONTENTTYPEcore.anothermockmodel)))')
|
||||
)
|
||||
|
||||
def test_build_query_with_punctuation(self):
|
||||
self.sq.add_filter(SQ(content='http://www.example.com'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue