pytest-api/tests/helpers.py
Greg Gauthier a727c58cf3
All checks were successful
Pylint / build (3.12) (push) Successful in 9s
execute / build (3.12) (push) Successful in 25s
code cleanup for pylint
2024-07-22 19:26:27 +01:00

14 lines
397 B
Python

import json
import os
CWD = os.path.dirname(os.path.realpath(__file__))
def get_expected_response(pkg, test_name):
expected_response_file = test_name + ".json"
with open(
os.path.join(CWD, pkg, 'expected_responses', expected_response_file),
'r', encoding="utf8") as file:
expected_response = json.load(file)
return expected_response