mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 13:28:00 +01:00
Remove fixture for dummy fetcher
This commit is contained in:
parent
6ab8ee2706
commit
2c2c5ef766
2 changed files with 6 additions and 15 deletions
|
@ -24,8 +24,6 @@ Common task fixtures.
|
|||
|
||||
from typing import Dict
|
||||
|
||||
import pytest
|
||||
|
||||
from fimfarchive.exceptions import InvalidStoryError
|
||||
from fimfarchive.fetchers import Fetcher
|
||||
from fimfarchive.stories import Story
|
||||
|
@ -71,11 +69,3 @@ class DummyFetcher(Fetcher):
|
|||
return self.stories[key]
|
||||
except KeyError:
|
||||
raise InvalidStoryError()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def dummy() -> DummyFetcher:
|
||||
"""
|
||||
Returns a `Fetcher` dummy.
|
||||
"""
|
||||
return DummyFetcher()
|
||||
|
|
|
@ -22,7 +22,6 @@ Update task tests.
|
|||
#
|
||||
|
||||
|
||||
from copy import deepcopy
|
||||
from unittest.mock import MagicMock, call, patch
|
||||
|
||||
import pytest
|
||||
|
@ -34,6 +33,8 @@ from fimfarchive.tasks.update import (
|
|||
UpdateTask, SUCCESS_DELAY, SKIPPED_DELAY, FAILURE_DELAY,
|
||||
)
|
||||
|
||||
from .conftest import DummyFetcher
|
||||
|
||||
|
||||
class TestUpdateTask:
|
||||
"""
|
||||
|
@ -41,18 +42,18 @@ class TestUpdateTask:
|
|||
"""
|
||||
|
||||
@pytest.fixture
|
||||
def fimfiction(self, dummy):
|
||||
def fimfiction(self):
|
||||
"""
|
||||
Returns a `Fetcher` simulating Fimfiction.
|
||||
"""
|
||||
return deepcopy(dummy)
|
||||
return DummyFetcher()
|
||||
|
||||
@pytest.fixture
|
||||
def fimfarchive(self, dummy):
|
||||
def fimfarchive(self):
|
||||
"""
|
||||
Returns a `Fetcher` simulating Fimfarchive.
|
||||
"""
|
||||
return deepcopy(dummy)
|
||||
return DummyFetcher()
|
||||
|
||||
@pytest.fixture
|
||||
def selector(self):
|
||||
|
|
Loading…
Reference in a new issue