1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-05 04:40:11 +01:00
searxng/tests/unit
Markus Heiser 6c747c40c1 [fix] issue when upgrading from werkzeug v2.0.3 to v2.1.0
In v2.1.0 werkzeug [1] fixed an issue [2] to keep relative redirect locations by
default [3].  Since relative locations are returned, we need to fix out test
cases to avoid AssertionErrors like this one::

    ======================================================================
    FAIL: test_index_html_get (tests.unit.test_webapp.ViewsTestCase)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
    File "/home/runner/work/searxng/searxng/tests/unit/test_webapp.py", line 105, in test_index_html_get
      self.assertEqual(result.location, 'http://localhost/search?q=test')
    AssertionError: '/search?q=test' != 'http://localhost/search?q=test'
    - /search?q=test
    + http://localhost/search?q=test

[1] https://werkzeug.palletsprojects.com/
[2] https://github.com/pallets/werkzeug/issues/2352 fixed in
[3] https://github.com/pallets/werkzeug/pull/2354

Related-to: https://github.com/searxng/searxng/pull/1039#issuecomment-1085538288
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-01 10:34:21 +02:00
..
engines [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
network [mod] upgrade httpx 0.21.2 2022-01-05 18:46:00 +01:00
settings [fix] changeover of the unit tests to the simple theme 2022-02-20 18:51:12 +01:00
__init__.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_answerers.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_engines_init.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_external_bangs.py [fix] external bangs: don't overwrite Bangs in data trie 2022-01-12 19:37:13 +01:00
test_plugins.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_preferences.py [fix] changeover of the unit tests to the simple theme 2022-02-20 18:51:12 +01:00
test_query.py [fix] remove broken ? search operator 2022-01-06 14:10:58 +01:00
test_results.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_search.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_settings_loader.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_standalone_searx.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_utils.py [mod] add documentation about searx.utils 2022-01-29 22:49:42 +01:00
test_webadapter.py [fix] changeover of the unit tests to the simple theme 2022-02-20 18:51:12 +01:00
test_webapp.py [fix] issue when upgrading from werkzeug v2.0.3 to v2.1.0 2022-04-01 10:34:21 +02:00
test_webutils.py [mod] webutils.py: remove dead code 2021-12-28 10:14:38 +01:00