From 039f572f69ff69f13c96ec002b7b6f34cbbc3b08 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 2 Dec 2023 12:52:43 +0100 Subject: [PATCH] fetch url from env --- tests/conftest.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 1c4eb11..9632ef1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -85,8 +85,11 @@ def native_api(monkeypatch): Api object. """ - monkeypatch.setenv("BASE_URL", "https://demo.dataverse.org") - return NativeApi(os.getenv("BASE_URL")) + + BASE_URL = os.getenv("BASE_URL") + + monkeypatch.setenv("BASE_URL", BASE_URL) + return NativeApi(BASE_URL) def import_dataverse_min_dict(): @@ -132,7 +135,10 @@ def import_datafile_min_dict(): Minimum Datafile metadata. """ - return {"pid": "doi:10.11587/EVMUHP", "filename": "tests/data/datafile.txt"} + return { + "pid": "doi:10.11587/EVMUHP", + "filename": "tests/data/datafile.txt", + } def import_datafile_full_dict():