From 6beb84efb8c8b62f1dfa9e7af33db73c06fabcb2 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Sun, 25 Oct 2020 18:03:14 +0100 Subject: [PATCH] [fix] adjust query unit tests --- tests/unit/test_query.py | 19 +++++++++---------- 1 file 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)