mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
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>
|
||
|---|---|---|
| .. | ||
| engines | ||
| network | ||
| settings | ||
| __init__.py | ||
| test_answerers.py | ||
| test_engines_init.py | ||
| test_external_bangs.py | ||
| test_plugins.py | ||
| test_preferences.py | ||
| test_query.py | ||
| test_results.py | ||
| test_search.py | ||
| test_settings_loader.py | ||
| test_standalone_searx.py | ||
| test_utils.py | ||
| test_webadapter.py | ||
| test_webapp.py | ||
| test_webutils.py | ||