mirror of
https://github.com/jdejaegh/python-irceline.git
synced 2025-06-27 03:35:56 +02:00
8 lines
210 B
Python
8 lines
210 B
Python
import json
|
|
|
|
|
|
def get_api_data(fixture: str, plain=False) -> str | dict:
|
|
with open(f'tests/fixtures/{fixture}', 'r') as file:
|
|
if plain:
|
|
return file.read()
|
|
return json.load(file)
|