summaryrefslogtreecommitdiff
path: root/tests/unit/test_webapp.py
diff options
context:
space:
mode:
authorGrant Lanham <contact@grantlanham.com>2024-10-05 16:10:56 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-10-15 08:10:52 +0200
commit3e87354f0ea62d5e2cf22bba136f0e5fdf71cb81 (patch)
treefe3004ab9f7e3ef56c29b6d1b84d392fade1319f /tests/unit/test_webapp.py
parentd448def1a66afe9e0b702ac25ca921526a3f0ca2 (diff)
downloadsearxng-3e87354f0ea62d5e2cf22bba136f0e5fdf71cb81.tar.gz
searxng-3e87354f0ea62d5e2cf22bba136f0e5fdf71cb81.zip
[fix] float operations in calculator plugin
This patch adds an additional *isinstance* check within the ast parser to check for float along with int, fixing the underlying issue. Co-Authored: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'tests/unit/test_webapp.py')
-rw-r--r--tests/unit/test_webapp.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py
index 7c6e1ef82..31bfdec3d 100644
--- a/tests/unit/test_webapp.py
+++ b/tests/unit/test_webapp.py
@@ -4,6 +4,7 @@
import logging
import json
from urllib.parse import ParseResult
+import babel
from mock import Mock
from searx.results import Timing
@@ -82,6 +83,7 @@ class ViewsTestCase(SearxTestCase): # pylint: disable=missing-class-docstring,
redirect_url=None,
engine_data={},
)
+ search_self.search_query.locale = babel.Locale.parse("en-US", sep='-')
self.setattr4test(Search, 'search', search_mock)