summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-10-25 18:03:14 +0100
committerAdam Tauber <asciimoo@gmail.com>2020-10-25 18:03:28 +0100
commit6beb84efb8c8b62f1dfa9e7af33db73c06fabcb2 (patch)
tree8ed94f5bff61da65475f5b7abfb686b62520512a
parent1ac755087cd4a15e4749c130807528eeae7b4f35 (diff)
downloadsearxng-6beb84efb8c8b62f1dfa9e7af33db73c06fabcb2.tar.gz
searxng-6beb84efb8c8b62f1dfa9e7af33db73c06fabcb2.zip
[fix] adjust query unit tests
-rw-r--r--tests/unit/test_query.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/unit/test_query.py b/tests/unit/test_query.py
index f2cf842a4..d682876c0 100644
--- a/tests/unit/test_query.py
+++ b/tests/unit/test_query.py
@@ -9,7 +9,7 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(query_text, [])
self.assertEqual(query.getFullQuery(), query_text)
- self.assertEqual(len(query.query_parts), 1)
+ self.assertEqual(len(query.query_parts), 3)
self.assertEqual(len(query.languages), 0)
self.assertFalse(query.specific)
@@ -20,7 +20,7 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(full_query, [])
self.assertEqual(query.getFullQuery(), full_query)
- self.assertEqual(len(query.query_parts), 3)
+ self.assertEqual(len(query.query_parts), 5)
self.assertEqual(len(query.languages), 1)
self.assertIn(language, query.languages)
self.assertFalse(query.specific)
@@ -32,7 +32,7 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(full_query, [])
self.assertEqual(query.getFullQuery(), full_query)
- self.assertEqual(len(query.query_parts), 3)
+ self.assertEqual(len(query.query_parts), 5)
self.assertIn('en', query.languages)
self.assertFalse(query.specific)
@@ -43,7 +43,7 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(full_query, [])
self.assertEqual(query.getFullQuery(), full_query)
- self.assertEqual(len(query.query_parts), 3)
+ self.assertEqual(len(query.query_parts), 5)
self.assertIn('all', query.languages)
self.assertFalse(query.specific)
@@ -54,7 +54,7 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(full_query, [])
self.assertEqual(query.getFullQuery(), full_query)
- self.assertEqual(len(query.query_parts), 1)
+ self.assertEqual(len(query.query_parts), 5)
self.assertEqual(len(query.languages), 0)
self.assertFalse(query.specific)
@@ -63,7 +63,7 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(query_text, [])
self.assertEqual(query.getFullQuery(), query_text)
- self.assertEqual(len(query.query_parts), 3)
+ self.assertEqual(len(query.query_parts), 5)
self.assertEqual(query.timeout_limit, 3)
self.assertFalse(query.specific)
@@ -72,7 +72,7 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(query_text, [])
self.assertEqual(query.getFullQuery(), query_text)
- self.assertEqual(len(query.query_parts), 3)
+ self.assertEqual(len(query.query_parts), 5)
self.assertEqual(query.timeout_limit, 0.35)
self.assertFalse(query.specific)
@@ -81,7 +81,7 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(query_text, [])
self.assertEqual(query.getFullQuery(), query_text)
- self.assertEqual(len(query.query_parts), 3)
+ self.assertEqual(len(query.query_parts), 5)
self.assertEqual(query.timeout_limit, 3.5)
self.assertFalse(query.specific)
@@ -91,7 +91,6 @@ class TestQuery(SearxTestCase):
query = RawTextQuery(query_text, [])
self.assertEqual(query.getFullQuery(), query_text)
- self.assertEqual(len(query.query_parts), 1)
- self.assertEqual(query.query_parts[0], query_text)
+ self.assertEqual(len(query.query_parts), 5)
self.assertEqual(query.timeout_limit, None)
self.assertFalse(query.specific)