Skip to content

Commit f699cd2

Browse files
author
Andrei Neagu
committed
use proper patch
1 parent 6b257d0 commit f699cd2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/pytest-simcore/src/pytest_simcore/redis_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from fakeredis import FakeAsyncRedis
1212
from pytest_mock import MockerFixture
1313
from redis.asyncio import Redis, from_url
14-
from servicelib.redis import _client
1514
from settings_library.basic_types import PortInt
1615
from settings_library.redis import RedisDatabase, RedisSettings
1716
from tenacity.before_sleep import before_sleep_log
@@ -127,5 +126,5 @@ def mock_redis_socket_timeout(mocker: MockerFixture) -> None:
127126

128127
@pytest.fixture
129128
async def use_in_memory_redis(mocker: MockerFixture) -> RedisSettings:
130-
mocker.patch.object(_client, "aioredis", FakeAsyncRedis)
129+
mocker.patch("redis.asyncio.from_url", FakeAsyncRedis)
131130
return RedisSettings()

0 commit comments

Comments
 (0)