pytest-api/tests/helpers.py
2024-07-20 12:09:35 +01:00

16 lines
368 B
Python

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