pyupgrade fixed imports
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# allowing tests to access RedisAdapter's internal methods as needed for integration testing.
|
||||
"""Integration tests for the RedisAdapter."""
|
||||
|
||||
from typing import Generator
|
||||
from collections.abc import Generator
|
||||
import pytest
|
||||
import redis
|
||||
from redis.commands.json.path import Path as RedisPath
|
||||
@@ -11,7 +11,7 @@ from python_repositories.adapters.redis_adapter import RedisAdapter
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def data() -> Generator[dict[str, str], None, None]:
|
||||
def data() -> Generator[dict[str, str]]:
|
||||
"""Provide a sample data dictionary for tests."""
|
||||
yield {"foo": "bar"}
|
||||
|
||||
@@ -20,7 +20,7 @@ def data() -> Generator[dict[str, str], None, None]:
|
||||
def data_in_redis(
|
||||
raw_redis_client: redis.Redis,
|
||||
data: dict[str, str],
|
||||
) -> Generator[tuple[str, dict[str, str]], None, None]:
|
||||
) -> Generator[tuple[str, dict[str, str]]]:
|
||||
"""Fixture to set up a known value in Redis before each test."""
|
||||
key = "test_key"
|
||||
path = RedisPath.root_path()
|
||||
@@ -33,7 +33,7 @@ def data_in_redis(
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def redis_adapter(redis_container: str) -> Generator[RedisAdapter, None, None]:
|
||||
def redis_adapter(redis_container: str) -> Generator[RedisAdapter]:
|
||||
"""Fixture to provide a connected RedisAdapter instance."""
|
||||
adapter = RedisAdapter()
|
||||
adapter.connect()
|
||||
|
||||
Reference in New Issue
Block a user