mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-26 06:57:59 +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
|
from typing import Dict
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from fimfarchive.exceptions import InvalidStoryError
|
from fimfarchive.exceptions import InvalidStoryError
|
||||||
from fimfarchive.fetchers import Fetcher
|
from fimfarchive.fetchers import Fetcher
|
||||||
from fimfarchive.stories import Story
|
from fimfarchive.stories import Story
|
||||||
|
@ -71,11 +69,3 @@ class DummyFetcher(Fetcher):
|
||||||
return self.stories[key]
|
return self.stories[key]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise InvalidStoryError()
|
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
|
from unittest.mock import MagicMock, call, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -34,6 +33,8 @@ from fimfarchive.tasks.update import (
|
||||||
UpdateTask, SUCCESS_DELAY, SKIPPED_DELAY, FAILURE_DELAY,
|
UpdateTask, SUCCESS_DELAY, SKIPPED_DELAY, FAILURE_DELAY,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from .conftest import DummyFetcher
|
||||||
|
|
||||||
|
|
||||||
class TestUpdateTask:
|
class TestUpdateTask:
|
||||||
"""
|
"""
|
||||||
|
@ -41,18 +42,18 @@ class TestUpdateTask:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def fimfiction(self, dummy):
|
def fimfiction(self):
|
||||||
"""
|
"""
|
||||||
Returns a `Fetcher` simulating Fimfiction.
|
Returns a `Fetcher` simulating Fimfiction.
|
||||||
"""
|
"""
|
||||||
return deepcopy(dummy)
|
return DummyFetcher()
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def fimfarchive(self, dummy):
|
def fimfarchive(self):
|
||||||
"""
|
"""
|
||||||
Returns a `Fetcher` simulating Fimfarchive.
|
Returns a `Fetcher` simulating Fimfarchive.
|
||||||
"""
|
"""
|
||||||
return deepcopy(dummy)
|
return DummyFetcher()
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def selector(self):
|
def selector(self):
|
||||||
|
|
Loading…
Reference in a new issue