1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
"""Tests for fyta_cli - configurations."""
from typing import Generator
from aioresponses import aioresponses
import pytest
from syrupy import SnapshotAssertion
from .syrupy import FytaSnapshotExtension
@pytest.fixture(name="snapshot")
def snapshot_assertion(snapshot: SnapshotAssertion) -> SnapshotAssertion:
"""Return snapshot assertion fixture with the Fyta extension."""
return snapshot.use_extension(FytaSnapshotExtension)
@pytest.fixture(name="responses")
def aioresponses_fixture() -> Generator[aioresponses, None, None]:
"""Return aioresponses fixture."""
with aioresponses() as mocked_responses:
yield mocked_responses
|