mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 05:17:59 +01:00
Add global story test fixture
This commit is contained in:
parent
3ef4a7aecc
commit
c350abe479
1 changed files with 17 additions and 0 deletions
|
@ -28,6 +28,7 @@ import pytest
|
||||||
|
|
||||||
from fimfarchive.fetchers import Fetcher
|
from fimfarchive.fetchers import Fetcher
|
||||||
from fimfarchive.flavors import Flavor
|
from fimfarchive.flavors import Flavor
|
||||||
|
from fimfarchive.stories import Story
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -53,3 +54,19 @@ def flavor():
|
||||||
B = ()
|
B = ()
|
||||||
|
|
||||||
return MyFlavor
|
return MyFlavor
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def story(flavor):
|
||||||
|
"""
|
||||||
|
Returns a non-lazy dummy story.
|
||||||
|
"""
|
||||||
|
story = Story(
|
||||||
|
key=1,
|
||||||
|
fetcher=None,
|
||||||
|
meta={'id': 1},
|
||||||
|
data=b'<html />',
|
||||||
|
flavors={flavor.A},
|
||||||
|
)
|
||||||
|
|
||||||
|
return story
|
||||||
|
|
Loading…
Reference in a new issue