diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-04-12 17:34:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-12 17:34:21 +0200 |
| commit | 01cefffbf6efa8a027e0e7d720970fffadb6337a (patch) | |
| tree | a4c37f7b73897c7635ee5fab01c1e8e967e23d8a /tests/unit/test_webapp.py | |
| parent | 6c0114567e7ba1b3f4a54327eddf658b7474ca58 (diff) | |
| parent | d14994dc73ba5c95382812581dac146d9eceaafa (diff) | |
Merge pull request #1 from metasearch-lab/httpx_networks
Httpx networks
Diffstat (limited to 'tests/unit/test_webapp.py')
| -rw-r--r-- | tests/unit/test_webapp.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py index 7d7a04fdc..d3498f51a 100644 --- a/tests/unit/test_webapp.py +++ b/tests/unit/test_webapp.py @@ -3,14 +3,19 @@ import json from urllib.parse import ParseResult from mock import Mock -from searx import webapp from searx.testing import SearxTestCase from searx.search import Search +import searx.engines class ViewsTestCase(SearxTestCase): def setUp(self): + # skip init function (no external HTTP request) + self.setattr4test(searx.engines, 'initialize_engines', searx.engines.load_engines) + + from searx import webapp # pylint disable=import-outside-toplevel + webapp.app.config['TESTING'] = True # to get better error messages self.app = webapp.app.test_client() |