Skip to content

Commit

Permalink
fix for python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h committed Aug 6, 2023
1 parent ea899b8 commit c73673b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_asyncio/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,15 @@ async def do_read():
async def open_connection(*args, **kwargs):
return reader, writer

async def dummy_method(*args, **kwargs):
pass

# get dummy stream objects for the connection
with patch.object(asyncio, "open_connection", open_connection):
# disable the initial version handshake
with patch.multiple(conn, send_command=mock.DEFAULT, read_response=DEFAULT):
with patch.multiple(
conn, send_command=dummy_method, read_response=dummy_method
):
await conn.connect()

vals = await asyncio.gather(do_read(), do_close())
Expand Down

0 comments on commit c73673b

Please sign in to comment.