diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-12-24 10:16:36 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-12-24 10:16:41 +0100 |
commit | d9665cab55078aa6e0c6ca4dce4a2c7ea8c4177d (patch) | |
tree | 9cb0afaa480fef995a19e46672ad198a7512e0f1 /tests/test_collection.py | |
parent | 0e4924ebca62b6767639aad773816a62c6a3c9af (diff) |
Add support for search_aliases in the settings file.
Refs: https://todo.sr.ht/~valhalla/lesana/11
Diffstat (limited to 'tests/test_collection.py')
-rw-r--r-- | tests/test_collection.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_collection.py b/tests/test_collection.py index de349ed..1400f57 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -550,6 +550,18 @@ class testComplexCollection(unittest.TestCase): entry = self.collection.entry_from_eid(eid) self.assertEqual(entry.data['price'], "1.90") + def test_search_aliases(self): + search_query = "{{ nice }}" + search_query = self.collection.render_query_template(search_query) + print("QUERY IS", search_query) + self.collection.start_search(search_query) + res = self.collection.get_search_results() + matches = list(res) + self.assertEqual(len(matches), 2) + matches_ids = [m.eid for m in matches] + self.assertIn('8e9fa1ed3c1b4a30a6be7a98eda0cfa7', matches_ids) + self.assertIn('5084bc6e94f24dc6976629282ef30419', matches_ids) + class testCollectionWithErrors(unittest.TestCase): def setUp(self): |