Skip to content

Commit

Permalink
fix: tests for py3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Dec 9, 2023
1 parent 3b104cb commit c4ab079
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_impl.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
import socket
from test.test_asyncio import utils as test_utils
from types import ModuleType
Expand Down Expand Up @@ -71,4 +72,6 @@ def _socket(*args, **kw):

m_socket.socket = _socket # type: ignore
addr_info = [(2, 1, 6, "", ("107.6.106.82", 80))]
assert await create_connection(addr_info) == mock_socket
loop = asyncio.get_running_loop()
with mock.patch.object(loop, "sock_connect", return_value=None):
assert await create_connection(addr_info) == mock_socket

0 comments on commit c4ab079

Please sign in to comment.