Skip to content

Commit 6bdd8ce

Browse files
committed
Add fixture of catalog with local source
This will be used to test several forthcoming changes.
1 parent a0e1962 commit 6bdd8ce

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test_catalog.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@
2121
json_example = {"foo": "bar"}
2222

2323

24+
@pytest.fixture
25+
def local_catalog():
26+
catalog = create_catalog(
27+
'2019-09', '2020-12', 'next',
28+
name='local'
29+
)
30+
catalog.add_uri_source(
31+
URI('https://example.com/'),
32+
LocalSource(
33+
pathlib.Path(__file__).parent / 'data',
34+
suffix='.json',
35+
),
36+
)
37+
return catalog
38+
39+
2440
@pytest.fixture
2541
def new_catalog() -> Catalog:
2642
return Catalog(name=str(uuid.uuid4()))

0 commit comments

Comments
 (0)