Files
blog.pyaqa.ru/tests/unit/conftest.py

19 lines
354 B
Python

# Unit test fixtures
# Provides: mocks, stubs, isolated test data
from unittest.mock import AsyncMock, Mock
import pytest
@pytest.fixture
def mock_service():
"""Create a mock service for unit testing."""
return Mock()
@pytest.fixture
def mock_async_service():
"""Create an async mock service for unit testing."""
return AsyncMock()