From 3e87354f0ea62d5e2cf22bba136f0e5fdf71cb81 Mon Sep 17 00:00:00 2001 From: Grant Lanham Date: Sat, 5 Oct 2024 16:10:56 +0200 Subject: [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 --- tests/unit/test_webapp.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/unit/test_webapp.py') 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) -- cgit v1.2.3