1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/tests/conftest.py

22 lines
503 B
Python
Raw Permalink Normal View History

2018-11-08 19:45:21 +00:00
import os
import pytest
2019-02-22 22:23:09 +00:00
import pytest_filedata
2018-11-08 19:45:21 +00:00
from . import django_init
2018-11-08 19:45:21 +00:00
from peeringdb_server.inet import RdapLookup, RdapNotFoundError
2019-02-22 22:23:09 +00:00
pytest_filedata.setup(os.path.dirname(__file__))
2018-11-08 19:45:21 +00:00
def pytest_generate_tests(metafunc):
for fixture in metafunc.fixturenames:
2019-12-05 16:57:52 +00:00
if fixture.startswith("data_"):
2019-02-22 22:23:09 +00:00
data = pytest_filedata.get_data(fixture)
metafunc.parametrize(fixture, list(data.values()), ids=list(data.keys()))
2018-11-08 19:45:21 +00:00
@pytest.fixture
def rdap():
return RdapLookup()