refactor: extract fixtures

This commit is contained in:
Vlad Stan 2023-02-03 09:58:50 +02:00
parent f183027811
commit 3d1511a545
6 changed files with 220 additions and 227 deletions

12
tests/helpers.py Normal file
View file

@ -0,0 +1,12 @@
import json
FIXTURES_PATH = "tests/extensions/nostrrelay/fixture"
def get_fixtures(file):
"""
Read the content of the JSON file.
"""
with open(f"{FIXTURES_PATH}/{file}.json") as f:
raw_data = json.load(f)
return raw_data