Files
blog.pyaqa.ru/tests/e2e/conftest.py
Sergey Vanyushkin 14adcaa3e6
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/type Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
style: apply ruff formatting to source and test files
2026-05-02 12:05:14 +03:00

31 lines
702 B
Python

# E2E test fixtures
# Provides: full application state, end-to-end workflows, cleanup
from collections.abc import AsyncGenerator
import pytest
from fastapi import FastAPI
@pytest.fixture
async def e2e_app() -> AsyncGenerator[FastAPI]:
"""Create full application instance for E2E testing."""
from app.main import app_factory
app = app_factory()
yield app
# Cleanup after E2E test
@pytest.fixture
def e2e_user_data() -> dict[str, str]:
"""Generate realistic user data for E2E scenarios."""
from mimesis import Person
person = Person()
return {
"username": person.username(),
"email": person.email(),
"password": "SecurePass123!",
}