Commit b284d964 authored by Michal Čihař's avatar Michal Čihař

Complete fields coverage for testing fulltext search

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 3f5a057e
...@@ -438,7 +438,7 @@ class SearchMigrationTest(TestCase): ...@@ -438,7 +438,7 @@ class SearchMigrationTest(TestCase):
writer = sindex.writer() writer = sindex.writer()
writer.update_document( writer.update_document(
pk=1, pk=1,
source="text", source="source",
context="context", context="context",
location="location", location="location",
) )
...@@ -450,10 +450,11 @@ class SearchMigrationTest(TestCase): ...@@ -450,10 +450,11 @@ class SearchMigrationTest(TestCase):
comment="comment" comment="comment"
) )
writer.commit() writer.commit()
self.assertEqual( for item in ('source', 'context', 'location', 'target'):
fulltext_search('text', 'cs', {'source': True}), self.assertEqual(
set([1]) fulltext_search(item, 'cs', {item: True}),
) set([1])
)
def test_nonexisting(self): def test_nonexisting(self):
self.do_test(None, None) self.do_test(None, None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment