summaryrefslogtreecommitdiff
path: root/tests/unit/test_query.py
diff options
context:
space:
mode:
authorMarc Abonce Seguin <marc-abonce@mailbox.org>2021-01-09 22:11:41 -0700
committerMarc Abonce Seguin <marc-abonce@mailbox.org>2021-01-09 22:11:41 -0700
commit571ce9ff07e9f8522ad4e770699f8347ba8935f2 (patch)
tree78c4599da7b179d492fab5ba1c9ed76f16c52984 /tests/unit/test_query.py
parentc2aaf6f99276022a7e268fdb4dc29ce33a774813 (diff)
downloadsearxng-571ce9ff07e9f8522ad4e770699f8347ba8935f2.tar.gz
searxng-571ce9ff07e9f8522ad4e770699f8347ba8935f2.zip
fix empty colon in query from selecting Chinese
Diffstat (limited to 'tests/unit/test_query.py')
-rw-r--r--tests/unit/test_query.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/test_query.py b/tests/unit/test_query.py
index eff4d643c..0176f735e 100644
--- a/tests/unit/test_query.py
+++ b/tests/unit/test_query.py
@@ -59,6 +59,15 @@ class TestQuery(SearxTestCase):
self.assertEqual(len(query.languages), 0)
self.assertFalse(query.specific)
+ def test_empty_colon_in_query(self):
+ query_text = 'the : query'
+ query = RawTextQuery(query_text, [])
+
+ self.assertEqual(query.getFullQuery(), query_text)
+ self.assertEqual(len(query.query_parts), 0)
+ self.assertEqual(len(query.languages), 0)
+ self.assertFalse(query.specific)
+
def test_timeout_below100(self):
query_text = '<3 the query'
query = RawTextQuery(query_text, [])