refactor: extract fixtures
This commit is contained in:
parent
f183027811
commit
3d1511a545
6 changed files with 220 additions and 227 deletions
12
tests/helpers.py
Normal file
12
tests/helpers.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue