Skip to content

Commit

Permalink
fix caplog tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Ilyushenkov committed Dec 12, 2023
1 parent 2a8164c commit 29e16ac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/unit_tests/aioredis_cluster/test_pooler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from aioredis_cluster.abc import AbcPool
from aioredis_cluster.abc import AbcConnection, AbcPool
from aioredis_cluster.pooler import Pooler
from aioredis_cluster.structs import Address

Expand Down Expand Up @@ -34,7 +34,11 @@ async def test_ensure_pool__identical_address(add_async_finalizer):


async def test_ensure_pool__multiple(add_async_finalizer):
pools = [object(), object(), object()]
pools = [
mock.AsyncMock(AbcConnection),
mock.AsyncMock(AbcConnection),
mock.AsyncMock(AbcConnection),
]
mocked_create_pool = mock.AsyncMock(side_effect=pools)

pooler = Pooler(mocked_create_pool)
Expand Down Expand Up @@ -92,7 +96,7 @@ async def create_pool_se(addr):


async def test_ensure_pool__error(add_async_finalizer):
pools = [RuntimeError(), object()]
pools = [RuntimeError(), mock.AsyncMock(AbcConnection)]
mocked_create_pool = mock.AsyncMock(side_effect=pools)

pooler = Pooler(mocked_create_pool)
Expand Down

0 comments on commit 29e16ac

Please sign in to comment.