Skip to content

Commit

Permalink
Fix mock signature to prevent resource warning for async method
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur committed Aug 25, 2023
1 parent e83b922 commit f29a239
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_asyncio/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,8 @@ async def do_close():
async def do_read():
return await conn.read_response()

reader = mock.AsyncMock()
writer = mock.AsyncMock()
writer.transport = mock.Mock()
reader = mock.Mock(spec=asyncio.StreamReader)
writer = mock.Mock(spec=asyncio.StreamWriter)
writer.transport.get_extra_info.side_effect = None

# for HiredisParser
Expand Down

0 comments on commit f29a239

Please sign in to comment.