From 42415e0e7b272de9006123ea983a5b6bb8c5b4a7 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Wed, 23 Dec 2020 03:31:03 +0100 Subject: inject configuration --- tests/test_matching.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_matching.py b/tests/test_matching.py index 9601bcb..7d8b7af 100644 --- a/tests/test_matching.py +++ b/tests/test_matching.py @@ -3,14 +3,18 @@ from fatcat_openapi_client import ReleaseEntity import pytest import elasticsearch import logging +from dynaconf import Dynaconf logger = logging.getLogger('test_matching') logger.setLevel(logging.DEBUG) +settings = Dynaconf(envvar_prefix="FUZZYCAT") +FATCAT_SEARCH_URL = settings.get("FATCAT_SEARCH_URL", "https://search.fatcat.wiki:443") + @pytest.fixture def es_client(): - return elasticsearch.Elasticsearch(["https://search.fatcat.wiki:443"]) + return elasticsearch.Elasticsearch([FATCAT_SEARCH_URL]) @pytest.mark.skip(reason="we cannot use POST on es, which client uses: https://git.io/JLssk") -- cgit v1.2.3