16 lines
314 B
Python
16 lines
314 B
Python
"""Fixtures to import into tests."""
|
|
|
|
from collections.abc import Iterator
|
|
|
|
import pytest
|
|
from fastapi.testclient import TestClient
|
|
|
|
from app.main import app
|
|
|
|
|
|
@pytest.fixture
|
|
def client() -> Iterator[TestClient]:
|
|
"""Client fixture to pass test client with."""
|
|
with TestClient(app) as client:
|
|
yield client
|