diff options
author | Grant Lanham <contact@grantlanham.com> | 2024-10-05 16:10:56 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-10-15 08:10:52 +0200 |
commit | 3e87354f0ea62d5e2cf22bba136f0e5fdf71cb81 (patch) | |
tree | fe3004ab9f7e3ef56c29b6d1b84d392fade1319f /tests/unit/test_webapp.py | |
parent | d448def1a66afe9e0b702ac25ca921526a3f0ca2 (diff) | |
download | searxng-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.py | 2 |
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) |