X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f230a3850ec568f2281f085a076a6185d8c82b5c..8b808f24709efb16f6b6eff6abb05b41341573c7:/apps/search/tests/index.py diff --git a/apps/search/tests/index.py b/apps/search/tests/index.py index ee376a84b..738288892 100644 --- a/apps/search/tests/index.py +++ b/apps/search/tests/index.py @@ -15,6 +15,7 @@ class BookSearchTests(WLTestCase): def setUp(self): JVM.attachCurrentThread() WLTestCase.setUp(self) + settings.NO_SEARCH_INDEX = False settings.SEARCH_INDEX = path.join(settings.MEDIA_ROOT, 'search') txt = path.join(path.dirname(__file__), 'files/fraszka-do-anusie.xml') @@ -46,8 +47,7 @@ class BookSearchTests(WLTestCase): b.book_id == self.book.id a = SearchResult.aggregate(books) # just one fragment hit. - assert len(filter(lambda x: x[1], a[0].hits)) == 1 - print a[0].process_hits() + assert len(a[0].hits) == 1 def test_search_perfect_author_title(self): books = self.search.search_perfect_book("szarzyński anusie")