From 59cd25789a14a8d6c00f8bc1d1e62ddcfc6029c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20C=2E=20Leit=C3=A3o?= Date: Sun, 11 May 2014 17:06:18 +0200 Subject: [PATCH] Fixed error that was causing test to pass due to assert(True). --- tests/xapian_tests/tests/xapian_query.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/xapian_tests/tests/xapian_query.py b/tests/xapian_tests/tests/xapian_query.py index eebf746..c38171d 100644 --- a/tests/xapian_tests/tests/xapian_query.py +++ b/tests/xapian_tests/tests/xapian_query.py @@ -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'))