diff options
Diffstat (limited to 'tests/unit/test_plugins.py')
-rw-r--r-- | tests/unit/test_plugins.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit/test_plugins.py b/tests/unit/test_plugins.py index 6878228f3..86b5ce930 100644 --- a/tests/unit/test_plugins.py +++ b/tests/unit/test_plugins.py @@ -1,12 +1,15 @@ # SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring +import babel from mock import Mock from searx import plugins from tests import SearxTestCase def get_search_mock(query, **kwargs): + lang = kwargs.get("lang", "en-US") + kwargs["locale"] = babel.Locale.parse(lang, sep="-") return Mock(search_query=Mock(query=query, **kwargs), result_container=Mock(answers={})) |