diff --git a/tests/conftest.py b/tests/conftest.py index 991374ba..b4e97af0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ import io +import json import uuid import jwt import ereuse_utils @@ -166,6 +167,11 @@ def file(name: str) -> dict: return json_encode(yaml2json(name)) +def file_json(name): + with Path(__file__).parent.joinpath('files').joinpath(name).open() as f: + return json.loads(f.read()) + + def file_workbench(name: str) -> dict: """Opens and parses a YAML file from the ``files`` subdir.""" with Path(__file__).parent.joinpath('workbench_files').joinpath(name + '.json').open() as f: