diff options
author | Bnyro <bnyro@tutanota.com> | 2023-09-10 18:44:16 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2023-09-19 09:40:57 +0200 |
commit | dcee82334548ad8849391b5c29cdcd868b65daad (patch) | |
tree | 5313b41db400f0215c4b46a9af8bb51f1c11a8b2 /tests | |
parent | 71508abcbf77df7e996114e4f142a5f15eced6e4 (diff) | |
download | searxng-dcee82334548ad8849391b5c29cdcd868b65daad.tar.gz searxng-dcee82334548ad8849391b5c29cdcd868b65daad.zip |
[feat] implement feeling lucky feature
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test_query.py | 12 | ||||
-rw-r--r-- | tests/unit/test_search.py | 2 |
2 files changed, 1 insertions, 13 deletions
diff --git a/tests/unit/test_query.py b/tests/unit/test_query.py index 7274a8da5..59bbd6574 100644 --- a/tests/unit/test_query.py +++ b/tests/unit/test_query.py @@ -225,18 +225,6 @@ class TestExternalBangParser(SearxTestCase): a = query.autocomplete_list[0] self.assertEqual(query.get_autocomplete_full_query(a), a + ' the query') - def test_external_bang_autocomplete_empty(self): - query_text = 'the query !!' - query = RawTextQuery(query_text, []) - - self.assertEqual(query.getFullQuery(), 'the query !!') - self.assertEqual(len(query.query_parts), 0) - self.assertFalse(query.specific) - self.assertGreater(len(query.autocomplete_list), 2) - - a = query.autocomplete_list[0] - self.assertEqual(query.get_autocomplete_full_query(a), 'the query ' + a) - class TestBang(SearxTestCase): diff --git a/tests/unit/test_search.py b/tests/unit/test_search.py index 11cb8d4e4..87f5f280b 100644 --- a/tests/unit/test_search.py +++ b/tests/unit/test_search.py @@ -27,7 +27,7 @@ class SearchQueryTestCase(SearxTestCase): def test_repr(self): s = SearchQuery('test', [EngineRef('bing', 'general')], 'all', 0, 1, '1', 5.0, 'g') self.assertEqual( - repr(s), "SearchQuery('test', [EngineRef('bing', 'general')], 'all', 0, 1, '1', 5.0, 'g')" + repr(s), "SearchQuery('test', [EngineRef('bing', 'general')], 'all', 0, 1, '1', 5.0, 'g', None)" ) # noqa def test_eq(self): |