Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

test.coverage is failing #3197

Open
Niveshkrishna opened this issue Mar 29, 2022 · 1 comment
Open

test.coverage is failing #3197

Niveshkrishna opened this issue Mar 29, 2022 · 1 comment
Labels

Comments

@Niveshkrishna
Copy link
Contributor

Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx
Commit id - 03eb9c2

How did you install Searx?
Manual installation with using manage script

What happened?
Coverage unit tests are failing with the following log output

TEST      unit test coverage
PYENV     [check] import yaml --> OK
PYENV     OK
.........DEBUG:searx.utils:HTMLTextExtractor: invalid HTML
<p><b>Lorem ipsum</i>dolor sit amet</p>
.....................................................................................................DEBUG:searx.webapp:static directory is /home/nivesh/Desktop/repos/searx/searx/static
DEBUG:searx.webapp:templates directory is /home/nivesh/Desktop/repos/searx/searx/templates
INFO:searx:Send SIGUSR1 signal to pid 30935 to start the checker
INFO:searx:debug mode: checker is disabled
EEEEEEEEEEEEEEEEEEEEEEE........DEBUG:searx.search:actual_timeout=3.0 (default_timeout=3.0, ?timeout_limit=None, max_request_timeout=None)
..DEBUG:asyncio:Using selector: EpollSelector
DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=True cert=None trust_env=False http2=False
TRACE:httpx._config:load_verify_locations cafile=/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/certifi/cacert.pem
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
TRACE:httpx._config:load_ssl_context verify=False cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
....DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
..DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
.DEBUG:asyncio:Using selector: EpollSelector
TRACE:httpx._config:load_ssl_context verify=<ssl.SSLContext object at 0x7ff0a7b396c0> cert=None trust_env=False http2=False
DEBUG:asyncio:Using selector: EpollSelector
...DEBUG:searx.search:actual_timeout=3.0 (default_timeout=3.0, ?timeout_limit=None, max_request_timeout=None)
.DEBUG:searx.search:actual_timeout=3.0 (default_timeout=3.0, ?timeout_limit=5.0, max_request_timeout=None)
.DEBUG:searx.search:actual_timeout=10.0 (default_timeout=3.0, ?timeout_limit=15.0, max_request_timeout=10.0)
.DEBUG:searx.search:actual_timeout=1.0 (default_timeout=3.0, ?timeout_limit=1.0, max_request_timeout=None)
.DEBUG:searx.search:actual_timeout=5.0 (default_timeout=3.0, ?timeout_limit=5.0, max_request_timeout=10.0)
.DEBUG:searx.search:actual_timeout=3.0 (default_timeout=3.0, ?timeout_limit=None, max_request_timeout=None)
....
======================================================================
ERROR: test_about (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 191, in test_about
    result = self.app.get('/about')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

-------------------- >> begin captured logging << --------------------
searx.webapp: DEBUG: static directory is /home/nivesh/Desktop/repos/searx/searx/static
searx.webapp: DEBUG: templates directory is /home/nivesh/Desktop/repos/searx/searx/templates
searx: INFO: Send SIGUSR1 signal to pid 30935 to start the checker
searx: INFO: debug mode: checker is disabled
--------------------- >> end captured logging << ---------------------
======================================================================
ERROR: test_browser_locale (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 217, in test_browser_locale
    result = self.app.get('/preferences', headers={'Accept-Language': 'zh-tw;q=0.8'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_config (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 249, in test_config
    result = self.app.get('/config')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_favicon (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 245, in test_favicon
    result = self.app.get('/favicon.ico')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_health (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 196, in test_health
    result = self.app.get('/healthz')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_index_csv (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 145, in test_index_csv
    result = self.app.post('/', data={'q': 'test', 'format': 'csv'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_index_empty (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 84, in test_index_empty
    result = self.app.post('/')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_index_html_get (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 96, in test_index_html_get
    result = self.app.post('/?q=test')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_index_html_post (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 91, in test_index_html_post
    result = self.app.post('/', data={'q': 'test'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_index_json (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 132, in test_index_json
    result = self.app.post('/', data={'q': 'test', 'format': 'json'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_index_rss (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 159, in test_index_rss
    result = self.app.post('/', data={'q': 'test', 'format': 'rss'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_opensearch_xml (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 240, in test_opensearch_xml
    result = self.app.get('/opensearch.xml')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_preferences (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 201, in test_preferences
    result = self.app.get('/preferences')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_robots_txt (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 235, in test_robots_txt
    result = self.app.get('/robots.txt')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_search_csv (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 149, in test_search_csv
    result = self.app.post('/search', data={'q': 'test', 'format': 'csv'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_search_empty_csv (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 110, in test_search_empty_csv
    result = self.app.post('/search', data={'q': '', 'format': 'csv'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_search_empty_html (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 101, in test_search_empty_html
    result = self.app.post('/search', data={'q': ''})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_search_empty_json (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 106, in test_search_empty_json
    result = self.app.post('/search', data={'q': '', 'format': 'json'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_search_empty_rss (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 114, in test_search_empty_rss
    result = self.app.post('/search', data={'q': '', 'format': 'rss'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_search_html (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 118, in test_search_html
    result = self.app.post('/search', data={'q': 'test'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_search_json (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 136, in test_search_json
    result = self.app.post('/search', data={'q': 'test', 'format': 'json'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_search_rss (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 163, in test_search_rss
    result = self.app.post('/search', data={'q': 'test', 'format': 'rss'})
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1139, in post
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

======================================================================
ERROR: test_stats (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nivesh/Desktop/repos/searx/tests/unit/test_webapp.py", line 231, in test_stats
    result = self.app.get('/stats')
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1134, in get
    return self.open(*args, **kw)
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/flask/testing.py", line 216, in open
    return super().open(  # type: ignore
  File "/home/nivesh/Desktop/repos/searx/local/py3/lib/python3.9/site-packages/werkzeug/test.py", line 1081, in open
    builder = EnvironBuilder(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'as_tuple'

----------------------------------------------------------------------
Ran 170 tests in 3.031s

FAILED (errors=23)
Name                                           Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------------------------
searx/__init__.py                                 66     21     14      5    65%   33-36, 40, 55-58, 63, 70, 72, 79, 83, 87, 91, 95, 99, 103, 107, 111, 115
searx/answerers/__init__.py                       34      6     18      2    77%   17, 38-42
searx/answerers/random/answerer.py                32     12      8      1    52%   16, 21, 25, 29, 33-35, 39, 56-59, 65
searx/answerers/statistics/answerer.py            29     17     14      1    30%   20, 27-44, 50
searx/autocomplete.py                             79     60     24      0    18%   33-36, 41-52, 57-67, 72-77, 82-92, 97-101, 106-109, 114-126, 131-136, 151-158
searx/data/__init__.py                            18      2      0      0    89%   40-41
searx/engines/1337x.py                            25     14      2      0    41%   27-29, 33-53
searx/engines/__init__.py                        149     65     76      8    59%   65-66, 69-71, 77-82, 89, 104, 106-108, 115->130, 138->exit, 172-173, 181-186, 191-249
searx/engines/ahmia.py                            43     24      8      0    37%   42-47, 51-85
searx/engines/apkmirror.py                        27     13      2      0    48%   39-44, 48-68
searx/engines/archlinux.py                        42     25      8      0    34%   34-36, 71-73, 106-123, 129-145
searx/engines/arxiv.py                            31     20      4      0    31%   32-40, 44-75
searx/engines/bandcamp.py                         33     22      8      0    27%   37-43, 50-73
searx/engines/base.py                             49     49     20      0     0%   2-117
searx/engines/bing.py                             67     49     14      0    22%   36, 41-56, 61-105, 110-124
searx/engines/bing_images.py                      42     21      4      0    46%   53-72, 77-106
searx/engines/bing_news.py                        65     43     18      0    27%   41-45, 50-54, 58-68, 73-85, 90-131
searx/engines/bing_videos.py                      42     22      4      0    43%   51-77, 82-101
searx/engines/btdigg.py                           37     26      4      0    27%   34-37, 42-89
searx/engines/ccengine.py                         19      8      2      0    52%   32-39, 43-53
searx/engines/command.py                         122    122     66      0     0%   2-172
searx/engines/core.py                             41     41     12      0     0%   2-82
searx/engines/currency_convert.py                 22     12      0      0    45%   27-28, 33-54
searx/engines/dailymotion.py                      44     30     12      0    25%   36-45, 50-79, 84-98
searx/engines/deezer.py                           26     15      6      0    34%   34-38, 43-70
searx/engines/deviantart.py                       30     19     10      0    28%   39-48, 52-77
searx/engines/dictzone.py                         29     16      6      0    37%   30-34, 38-60
searx/engines/digbt.py                            29     29      4      0     0%   2-60
searx/engines/digg.py                             27     14      4      0    42%   38-44, 47-68
searx/engines/doku.py                             38     38     12      0     0%   2-87
searx/engines/duckduckgo.py                       85     67     28      0    16%   59-66, 71-118, 124-172, 179-186
searx/engines/duckduckgo_definitions.py          141    120     72      0    10%   47, 52-61, 65-69, 73-241, 245-249, 254-261
searx/engines/duckduckgo_images.py                44     28      8      0    31%   39-46, 52-69, 74-94
searx/engines/duden.py                            32     20      6      0    32%   40-49, 56-77
searx/engines/dummy-offline.py                     4      1      0      0    75%   18
searx/engines/dummy.py                             6      1      0      0    83%   24
searx/engines/ebay.py                             38     19      6      0    43%   37-38, 42-73
searx/engines/elasticsearch.py                    69     69     22      0     0%   2-131
searx/engines/etools.py                           25     13      4      0    41%   32-39, 43-56
searx/engines/fdroid.py                           23     12      2      0    44%   31-33, 38-54
searx/engines/flickr.py                           38     38     14      0     0%   2-92
searx/engines/flickr_noapi.py                     70     47     22      0    25%   43, 47-49, 53-55, 59-127
searx/engines/framalibre.py                       34     18      6      0    40%   38-42, 47-72
searx/engines/freesound.py                        25     25      2      0     0%   2-69
searx/engines/frinkiac.py                         21      9      2      0    52%   32-33, 37-51
searx/engines/genius.py                           45     29     10      0    29%   30-34, 38-50, 54-59, 63-76, 83-90
searx/engines/gentoo.py                           42     25      8      0    34%   32-34, 54-56, 89-107, 113-129
searx/engines/gigablast.py                        65     44     24      0    24%   52-61, 64, 72-94, 98-138
searx/engines/github.py                           24     15      6      0    30%   30-34, 39-63
searx/engines/google.py                          129     99     44      0    17%   138-194, 197-198, 204-245, 251-326, 331-341
searx/engines/google_images.py                    84     65     24      0    18%   73-82, 88-95, 101-128, 133-209
searx/engines/google_news.py                      64     44     14      0    26%   83-119, 124-196
searx/engines/google_scholar.py                   55     36     14      0    28%   67-70, 76-108, 112-156
searx/engines/google_videos.py                    79     58     28      0    20%   81-82, 87-113, 119-145, 150-201
searx/engines/imdb.py                             25     15      8      0    30%   34-36, 40-55
searx/engines/ina.py                              43     22      4      0    45%   43-47, 52-85
searx/engines/invidious.py                        50     37     20      0    19%   36-63, 68-122
searx/engines/json_engine.py                      89     66     38      0    18%   29-35, 39-41, 45-51, 55-75, 79-81, 85-94, 98, 102-143
searx/engines/kickass.py                          43     28      6      0    31%   37-40, 45-94
searx/engines/loc.py                              25     14      6      0    35%   37-43, 47-68
searx/engines/mediathekviewweb.py                 23     13      2      0    40%   27-46, 50-68
searx/engines/mediawiki.py                        35     22     11      0    28%   39-64, 69-90
searx/engines/meilisearch.py                      33     33     10      0     0%   2-59
searx/engines/microsoft_academic.py               34     23     10      0    25%   26-41, 45-63, 67-73
searx/engines/mixcloud.py                         25     13      2      0    44%   34-39, 44-64
searx/engines/mongodb.py                          38     38     10      0     0%   2-61
searx/engines/mysql_server.py                     33     33      6      0     0%   2-62
searx/engines/nyaa.py                             53     34      6      0    32%   41-43, 48-111
searx/engines/onesearch.py                        23     12      2      0    44%   34-36, 42-57
searx/engines/opensemantic.py                     24     24      4      0     0%   2-46
searx/engines/openstreetmap.py                   183    143     84      0    16%   71-74, 78-79, 83-84, 88, 141-144, 149-194, 198-200, 212-249, 257-295, 301-316, 322-338, 343-357, 367-381, 389-393, 401-411, 416-418, 423-441
searx/engines/pdbe.py                             51     38     10      0    21%   35-41, 46-73, 78-115
searx/engines/peertube.py                         44     30      8      0    27%   30-41, 45, 50-91, 95-96
searx/engines/photon.py                           49     35     20      0    20%   36-48, 53-133
searx/engines/piratebay.py                        37     23      4      0    34%   50-55, 60-101
searx/engines/postgresql.py                       38     38      8      0     0%   2-69
searx/engines/prowlarr.py                         42     42     22      0     0%   2-80
searx/engines/pubmed.py                           51     38      6      0    23%   37-45, 49-105
searx/engines/qwant.py                           102     85     44      0    12%   67-100, 107-227, 233-245
searx/engines/recoll.py                           50     50     20      0     0%   2-111
searx/engines/reddit.py                           38     27      8      0    24%   31-34, 39-79
searx/engines/redis_server.py                     43     43     16      0     0%   2-69
searx/engines/rumble.py                           44     23      6      0    42%   42-43, 47-81
searx/engines/scanr_structures.py                 33     33     12      0     0%   2-79
searx/engines/searchcode_code.py                  25     14      4      0    38%   36-38, 43-71
searx/engines/searx_engine.py                     21     21      4      0     0%   2-59
searx/engines/semantic_scholar.py                 42     33     16      0    16%   24-40, 44-79
searx/engines/sepiasearch.py                      44     26     10      0    33%   50-52, 56-71, 75-102
searx/engines/seznam.py                           31     21      8      0    26%   31-45, 49-66
searx/engines/sjp.py                              56     41     22      0    19%   36-38, 42-92
searx/engines/solidtorrents.py                    22     10      2      0    50%   31-35, 39-53
searx/engines/solr.py                             49     49     20      0     0%   2-74
searx/engines/soundcloud.py                       48     28     14      0    32%   48-66, 72, 77-83, 88-109
searx/engines/spotify.py                          31     31      4      0     0%   2-80
searx/engines/springer.py                         34     34     10      0     0%   2-74
searx/engines/sqlite.py                           33     33      8      0     0%   2-51
searx/engines/stackexchange.py                    26     13      4      0    43%   35-45, 50-67
searx/engines/startpage.py                       111     80     43      0    20%   66-68, 86-106, 119-138, 143-208, 220-269
searx/engines/tineye.py                           33     22      4      0    30%   30-43, 47-86
searx/engines/tokyotoshokan.py                    54     41     18      0    18%   33-35, 40-101
searx/engines/torrentz.py                         51     38      6      0    23%   34-37, 42-99
searx/engines/translated.py                       19      8      2      0    52%   27-35, 39-51
searx/engines/unsplash.py                         23     11      6      0    41%   27-30, 39-40, 44-55
searx/engines/vimeo.py                            28     16      2      0    40%   35-38, 43-68
searx/engines/wikidata.py                        361    276    110      0    21%   112, 119-128, 132-142, 146-161, 165-182, 186-262, 266-278, 282-410, 418, 421, 424, 427, 430, 433, 436, 439, 445, 448, 453, 456-461, 469-471, 475, 478, 481, 487, 490-491, 497, 500, 503, 506, 516-518, 521-529, 535, 538, 541, 546, 549-553, 556-560, 568-569, 575, 582, 590, 594, 597-604, 608-609, 613-614, 617-619, 627, 648-666, 670-675, 680-694
searx/engines/wikipedia.py                        61     47     20      0    17%   30-33, 38-52, 57-90, 95-111
searx/engines/wolframalpha_api.py                 66     66     22      0     0%   2-134
searx/engines/wolframalpha_noapi.py               58     43     24      0    18%   53-60, 64, 70-75, 80-126
searx/engines/wordnik.py                          46     33     16      0    21%   31-33, 37-77
searx/engines/www1x.py                            24     12      2      0    46%   32-34, 39-57
searx/engines/xpath.py                            54     36     26      0    22%   29-39, 43-93
searx/engines/xpath_flex.py                       49     49     14      0     0%   3-121
searx/engines/yacy.py                             44     44     16      0     0%   2-114
searx/engines/yahoo.py                            65     48     20      0    20%   70-76, 81-99, 103-116, 120-150, 155-162
searx/engines/yahoo_news.py                       52     31     10      0    34%   60-67, 70-111
searx/engines/yggtorrent.py                       62     45     12      0    23%   42-46, 51-60, 65-128
searx/engines/youtube_api.py                      38     38      8      0     0%   2-91
searx/engines/youtube_noapi.py                    77     55     30      0    21%   47-61, 66-68, 72-105, 109-153, 157-160
searx/exceptions.py                               40     12     24      0    78%   26-33, 71-73, 83, 93
searx/external_bang.py                            61      0     36      1    99%   66->65
searx/external_urls.py                            36     27     16      0    17%   17-18, 22-26, 37-51, 55-59, 85-89
searx/languages.py                                 1      0      0      0   100%
searx/metrology/__init__.py                        0      0      0      0   100%
searx/metrology/error_recorder.py                107     82     38      0    19%   22-28, 31-33, 38, 42, 48-50, 54-60, 64-67, 72-85, 89-105, 109-114, 118-124, 128-135, 139-144
searx/network/__init__.py                        103     71     26      0    25%   26, 39-42, 47-100, 104-105, 109-110, 114-115, 119, 123, 127, 131, 135-149, 153, 171-188
searx/network/client.py                           76     25     30      6    61%   41, 51-58, 66-74, 108, 109->exit, 111, 123-131, 134, 138->140
searx/network/network.py                         237     39    106     11    81%   153-158, 162-177, 201-202, 210-211, 241->exit, 251-259, 285-289, 295, 330->332, 344->346, 353, 366, 376->exit, 394->399
searx/network/raise_for_httperror.py              31     23     20      0    16%   10-18, 22, 26-33, 37-39, 43-44, 59-66
searx/plugins/__init__.py                        114     62     50      7    45%   60-61, 65, 69-70, 80->79, 83, 89-104, 108-123, 127-157, 161-163, 178, 181-185, 189
searx/plugins/ahmia_filter.py                     20     10      4      0    42%   18-20, 24-27, 31-33
searx/plugins/hash_plugin.py                      22      2      6      2    86%   37, 42
searx/plugins/hostname_replace.py                 21      7      8      1    52%   15->exit, 21-28
searx/plugins/https_rewrite.py                   105     43     54      8    55%   34, 57-59, 67, 75, 87, 101, 110, 119-121, 127, 138-139, 149-150, 173-221, 225-230
searx/plugins/infinite_scroll.py                   7      0      0      0   100%
searx/plugins/oa_doi_rewrite.py                   37     24     16      0    25%   18-25, 29-34, 38-48
searx/plugins/search_on_category_select.py         6      0      0      0   100%
searx/plugins/self_info.py                        19      1      8      2    89%   37, 41->44
searx/plugins/tracker_url_remover.py              25     16     10      0    26%   34-53
searx/plugins/vim_hotkeys.py                       7      0      0      0   100%
searx/preferences.py                             286     91    165     16    65%   48, 55, 68, 111-112, 119-125, 130, 136->exit, 142, 148-149, 156-160, 165, 173, 214-215, 225, 229, 237->239, 239->exit, 243-255, 260-261, 267, 293, 297, 300-301, 319, 418-435, 450, 460->exit, 466, 470-488, 495->497, 498, 504-513, 532-534
searx/query.py                                   195      0     98      1    99%   215->214
searx/results.py                                 255    134    148     28    41%   22, 40, 44, 64-131, 135-148, 182, 184, 186, 188, 190, 194-195, 197-198, 200-201, 207-208, 211-213, 217, 220-231, 238, 245-246, 249, 251, 256->259, 273, 282-283, 290, 295, 305-306, 309-312, 316-320, 330-366, 373->375, 384, 387-388, 391, 398
searx/search/__init__.py                         121     26     50      9    74%   44-49, 87->89, 99-101, 119, 142, 143->147, 167-172, 181->186, 193->196, 205-207, 210-220
searx/search/checker/__init__.py                   2      0      0      0   100%
searx/search/checker/__main__.py                  63     63     32      0     0%   3-91
searx/search/checker/background.py                83     52     22      3    32%   22-29, 33-34, 38-40, 45, 50-73, 77-81, 85-87, 91-93, 97->103, 111-125
searx/search/checker/impl.py                     286    215    162      0    19%   41, 50-56, 61-98, 102, 113-123, 131-133, 137-143, 146, 150, 153-155, 167-172, 176-177, 180-182, 185-193, 196-223, 226-227, 230-232, 235-241, 244-258, 262-263, 267-268, 274-275, 279-291, 295-299, 310-312, 316-327, 337-339, 343-345, 349-362, 365-375, 380-381, 384-391, 394-397, 400-412, 415-416
searx/search/models.py                            33      3      6      0    87%   21, 52, 70
searx/search/processors/__init__.py               36      5     14      4    82%   24, 32, 40-41, 53
searx/search/processors/abstract.py               47     18     12      3    58%   18-25, 34, 38, 48, 55, 58-64, 67
searx/search/processors/offline.py                36     25      8      0    30%   18-22, 25, 28-51
searx/search/processors/online.py                127     83     46      7    31%   42, 46-47, 60-105, 114, 120-124, 145-198, 201, 208-212, 219-262
searx/search/processors/online_currency.py        43     31      8      0    27%   14-16, 21-25, 30, 38-59, 62-69
searx/search/processors/online_dictionary.py      28     20     10      0    26%   17-37, 40-55
searx/settings_loader.py                          81      1     48      1    98%   119
searx/shared/__init__.py                          19     11      2      0    38%   14-29
searx/shared/shared_abstract.py                   14      4      2      0    75%   9, 13, 17, 21
searx/shared/shared_simple.py                     24     12      2      0    54%   16, 19, 22, 29-39
searx/shared/shared_uwsgi.py                      40     40     14      0     0%   3-64
searx/testing.py                                  47     18      8      0    60%   24, 28, 32, 36, 43-69, 72-74, 79-82
searx/utils.py                                   278     71    150      6    69%   75, 92, 101, 204, 210, 220-224, 275, 294-316, 321-324, 332-336, 356-369, 398, 453-460, 489, 497-506
searx/version.py                                   5      0      0      0   100%
searx/webadapter.py                              142     45     82     19    61%   47, 53, 58, 62, 66, 73, 76-80, 86, 96, 102->105, 107-110, 117-128, 132-151, 169->181, 173-177, 183-185, 191, 204-205, 213, 235
searx/webapp.py                                  630    473    303      3    18%   22-23, 32-33, 108-109, 154->158, 182-186, 193-202, 207-232, 238-282, 288, 292, 303-308, 312-315, 319-325, 329-342, 348-369, 374, 381-452, 457-464, 469-512, 518-522, 527-537, 541-563, 574-581, 590, 601-744, 770-776, 782, 792-838, 846-890, 915-916, 926-1000, 1006-1009, 1017-1040, 1045-1046, 1051, 1062-1080, 1085, 1096-1099, 1105-1131, 1155, 1159-1160, 1174-1176, 1211-1218, 1221-1235
searx/webutils.py                                 92      5     38      3    92%   51->53, 54, 61->63, 145-148
------------------------------------------------------------------------------------------
TOTAL                                           9906   6115   3582    158    34%

ERROR: test.coverage exit with error (1)

How To Reproduce

Run sudo ./manage test.coverage from root directory of this repo

Expected behavior

No errors

Screenshots & Logs

Additional context

@Niveshkrishna
Copy link
Contributor Author

This is related to the latest release of werkzeug package. When locking this package in requirements.txt, tests again pass

werkzeug==2.0.3

But I hope we need to find a better a fix for this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant