Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Nov 5, 2024
1 parent 449e589 commit 72c1cba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,33 +588,33 @@ async def test_release_proto_closed_future(
assert protocol.closed.result() is None


async def test__drop_acquire_per_host1(
async def test__release_acquired_per_host1(
loop: asyncio.AbstractEventLoop, key: ConnectionKey
) -> None:
conn = aiohttp.BaseConnector()
conn._drop_acquired(key, create_mocked_conn(loop))
conn._release_acquired(key, create_mocked_conn(loop))
assert len(conn._acquired_per_host) == 0


async def test__drop_acquire_per_host2(
async def test__release_acquired_per_host2(
loop: asyncio.AbstractEventLoop, key: ConnectionKey
) -> None:
conn = aiohttp.BaseConnector()
handler = create_mocked_conn(loop)
conn._acquired_per_host[key].add(handler)
conn._drop_acquired(key, handler)
conn._release_acquired(key, handler)
assert len(conn._acquired_per_host) == 0


async def test__drop_acquire_per_host3(
async def test__release_acquired_per_host3(
loop: asyncio.AbstractEventLoop, key: ConnectionKey
) -> None:
conn = aiohttp.BaseConnector()
handler = create_mocked_conn(loop)
handler2 = create_mocked_conn(loop)
conn._acquired_per_host[key].add(handler)
conn._acquired_per_host[key].add(handler2)
conn._drop_acquired(key, handler)
conn._release_acquired(key, handler)
assert len(conn._acquired_per_host) == 1
assert conn._acquired_per_host[key] == {handler2}

Expand Down

0 comments on commit 72c1cba

Please sign in to comment.