File: conftest.py

package info (click to toggle)
fyta-cli 0.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292 kB
  • sloc: python: 738; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 659 bytes parent folder | download
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