Files
python-repositories/tests/unit/conftest.py
T
Brian Bjarke JensenandCursor 565879dd52
Test Python Package / unit-tests (pull_request) Successful in 12s
Code Quality Pipeline / code-quality (pull_request) Successful in 19s
PR Title Check / check-title (pull_request) Successful in 31s
Test Python Package / integration-tests (pull_request) Successful in 23s
Test Python Package / coverage-report (pull_request) Successful in 10s
Unify dev tooling via uv so pre-commit, CI, and the update bot stay aligned.
Route Python hooks through uv run with versions pinned in uv.lock, add explicit
Ruff settings, and extend the dependency bot to run pre-commit autoupdate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 14:29:22 +02:00

28 lines
834 B
Python

"""Unit test fixtures for mocked adapters."""
from __future__ import annotations
from unittest.mock import MagicMock
from minio import Minio
import pytest
import redis
from python_repositories.adapters.minio_adapter import MinioAdapter
from python_repositories.adapters.redis_adapter import RedisAdapter
from tests.conftest import TEST_MINIO_CONFIG, TEST_REDIS_CONFIG
@pytest.fixture
def redis_adapter() -> RedisAdapter:
"""Provide a RedisAdapter with an injected mock client."""
mock_client = MagicMock(spec=redis.Redis)
return RedisAdapter(config=TEST_REDIS_CONFIG, client=mock_client)
@pytest.fixture
def minio_adapter() -> MinioAdapter:
"""Provide a MinioAdapter with an injected mock client."""
mock_client = MagicMock(spec=Minio)
return MinioAdapter(config=TEST_MINIO_CONFIG, client=mock_client)