summaryrefslogtreecommitdiff
path: root/tests/unit/test_webapp.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2025-03-05 17:29:20 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-03-15 10:36:33 +0100
commit8769b7c6d6d62b961d62b9454bd12f69fba298c8 (patch)
treebdf58284b785169606060acc257db5c1e828b430 /tests/unit/test_webapp.py
parentd6ce29f7f05a2ff49e1b8566d49b9ca21c30936a (diff)
[refactor] typification of SearXNG (MainResult) / result items (part 2)
The class ReslutContainer has been revised, it can now handle the typed Result items of classes: - MainResult - LegacyResult (a dict wrapper for backward compatibility) Due to the now complete typing of theses three clases, instead of the *getitem* accesses, the fields can now be accessed directly via attributes (which is also supported by the IDE). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'tests/unit/test_webapp.py')
-rw-r--r--tests/unit/test_webapp.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py
index e8f4fcdcd..35a41302c 100644
--- a/tests/unit/test_webapp.py
+++ b/tests/unit/test_webapp.py
@@ -148,11 +148,10 @@ class ViewsTestCase(SearxTestCase): # pylint: disable=too-many-public-methods
def test_search_csv(self):
result = self.client.post('/search', data={'q': 'test', 'format': 'csv'})
-
self.assertEqual(
b'title,url,content,host,engine,score,type\r\n'
- b'First Test,http://first.test.xyz,first test content,first.test.xyz,startpage,,result\r\n' # noqa
- b'Second Test,http://second.test.xyz,second test content,second.test.xyz,youtube,,result\r\n', # noqa
+ + b'First Test,http://first.test.xyz,first test content,first.test.xyz,startpage,0,result\r\n'
+ + b'Second Test,http://second.test.xyz,second test content,second.test.xyz,youtube,0,result\r\n',
result.data,
)