From c350abe4792a6917674ee6b661995bafb68b9816 Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Sun, 8 Jan 2017 01:40:49 +0100 Subject: [PATCH] Add global story test fixture --- tests/conftest.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 035165e..cb8142f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -28,6 +28,7 @@ import pytest from fimfarchive.fetchers import Fetcher from fimfarchive.flavors import Flavor +from fimfarchive.stories import Story @pytest.fixture @@ -53,3 +54,19 @@ def flavor(): B = () return MyFlavor + + +@pytest.fixture +def story(flavor): + """ + Returns a non-lazy dummy story. + """ + story = Story( + key=1, + fetcher=None, + meta={'id': 1}, + data=b'', + flavors={flavor.A}, + ) + + return story