searx/tests/unit
Markus Heiser 3abf620418 [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-13 20:49:42 +02:00
..
engines [mod] remove unused import 2020-11-14 14:11:02 +01:00
network Fix issues in network after updating httpx to 0.21.x (#3169) 2022-02-28 22:05:20 +01:00
settings [fix] settings_loader: don't crash when a key exists only in the user settings 2020-12-03 11:35:12 +01:00
__init__.py [mod] remove buildout/makefile infrastructure 2016-01-10 19:23:10 +01:00
test_answerers.py Drop Python 2 (1/n): remove unicode string and url_utils 2020-09-10 10:39:04 +02:00
test_engines_init.py Fix issues in network after updating httpx to 0.21.x (#3169) 2022-02-28 22:05:20 +01:00
test_external_bangs.py Bump pylint from 2.10.2 to 2.12.2 (#3124) 2022-01-15 20:23:09 +01:00
test_plugins.py [mod] pylint: numerous minor code fixes 2020-12-01 15:21:19 +01:00
test_preferences.py [mod] pylint: numerous minor code fixes 2020-12-01 15:21:19 +01:00
test_query.py Fix issues in network after updating httpx to 0.21.x (#3169) 2022-02-28 22:05:20 +01:00
test_results.py [enh] Improve ranking based on language (#3053) 2021-11-15 20:31:22 +01:00
test_search.py [mod] searx.search.EngineRef: remove from_bang parameter 2020-12-18 12:29:48 +01:00
test_settings_loader.py [enh] settings.yml: add use_default_settings option (2nd version) 2020-11-27 19:40:04 +01:00
test_standalone_searx.py Add searx_extra package 2021-03-04 11:59:14 +01:00
test_utils.py Bump pylint from 2.9.6 to 2.10.2 2021-08-22 20:53:12 +02:00
test_webadapter.py [mod] split searx.search into different processors 2020-12-17 11:39:36 +01:00
test_webapp.py [fix] issue when upgrading from werkzeug v2.0.3 to v2.1.0 2022-04-13 20:49:42 +02:00
test_webutils.py Updated webutils.highlight_content to ignore double-quotes when highlighting query parts 2021-02-08 23:58:54 -05:00