-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathconftest.py
More file actions
44 lines (34 loc) · 1.05 KB
/
conftest.py
File metadata and controls
44 lines (34 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import pytest
import os
import json
@pytest.fixture()
def credentials():
"""
Retrieves the base URL and API token from the environment variables.
Returns:
tuple: A tuple containing the base URL and API token.
"""
return (
os.environ.get("BASE_URL").rstrip("/"),
os.environ.get("API_TOKEN"),
)
@pytest.fixture()
def minimal_upload():
"""
Returns the contents of the 'minimal_upload.json' file as a dictionary.
Returns:
dict: The contents of the 'minimal_upload.json' file.
"""
return json.load(open("tests/fixtures/minimal_upload.json"))
@pytest.fixture()
def minimal_upload_other_license():
"""
Returns the contents of the 'minimal_upload.json' file as a dictionary.
"""
return json.load(open("tests/fixtures/minimal_upload_other_license.json"))
@pytest.fixture()
def minimal_upload_custom_license():
"""
Returns the contents of the 'minimal_upload.json' file as a dictionary.
"""
return json.load(open("tests/fixtures/minimal_upload_custom_license.json"))