diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-07-02 12:12:11 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-07-24 10:07:48 -0700 |
commit | a1f14f5b5ce087cb4681d46817da2be0777e4220 (patch) | |
tree | 6f212219538ec0a794d69ae14a4c489f7d11227f /python/tests/fixtures.py | |
parent | b9ba24553e2e1de3c3ac0faeba59231ec512fa67 (diff) | |
download | fatcat-a1f14f5b5ce087cb4681d46817da2be0777e4220.tar.gz fatcat-a1f14f5b5ce087cb4681d46817da2be0777e4220.zip |
update web_search tests to mock ES client
Instead of using 'responses' mock of 'requests' library.
Tried using 'elasticmock' helper but it didn't work.
Diffstat (limited to 'python/tests/fixtures.py')
-rw-r--r-- | python/tests/fixtures.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/tests/fixtures.py b/python/tests/fixtures.py index 44c7be63..3263f243 100644 --- a/python/tests/fixtures.py +++ b/python/tests/fixtures.py @@ -1,9 +1,10 @@ import pytest from dotenv import load_dotenv +import elasticsearch + import fatcat_web import fatcat_openapi_client - from fatcat_openapi_client import * from fatcat_tools import authenticated_api @@ -13,6 +14,7 @@ def full_app(): fatcat_web.app.testing = True fatcat_web.app.debug = False fatcat_web.app.config['WTF_CSRF_ENABLED'] = False + fatcat_web.app.es_client = elasticsearch.Elasticsearch("mockbackend") return fatcat_web.app @pytest.fixture |