File python-311.patch of Package python-python-engineio
diff --git a/tests/asyncio/test_asyncio_server.py b/tests/asyncio/test_asyncio_server.py
index 47b3e6e..a55e1e0 100644
--- a/tests/asyncio/test_asyncio_server.py
+++ b/tests/asyncio/test_asyncio_server.py
@@ -278,9 +278,9 @@ def test_connect_custom_ping_times(self, import_module):
assert packets[0].data['pingTimeout'] == 123000
assert packets[0].data['pingInterval'] == 456000
- @mock.patch('engineio.asyncio_socket.AsyncSocket')
@mock.patch('importlib.import_module')
- def test_connect_bad_poll(self, import_module, AsyncSocket):
+ @mock.patch('engineio.asyncio_server.asyncio_socket.AsyncSocket')
+ def test_connect_bad_poll(self, AsyncSocket, import_module):
a = self.get_async_mock()
import_module.side_effect = [a]
AsyncSocket.return_value = self._get_mock_socket()
@@ -290,9 +290,9 @@ def test_connect_bad_poll(self, import_module, AsyncSocket):
assert a._async['make_response'].call_count == 1
assert a._async['make_response'].call_args[0][0] == '400 BAD REQUEST'
- @mock.patch('engineio.asyncio_socket.AsyncSocket')
@mock.patch('importlib.import_module')
- def test_connect_transport_websocket(self, import_module, AsyncSocket):
+ @mock.patch('engineio.asyncio_server.asyncio_socket.AsyncSocket')
+ def test_connect_transport_websocket(self, AsyncSocket, import_module):
a = self.get_async_mock(
{
'REQUEST_METHOD': 'GET',
@@ -312,9 +312,9 @@ def test_connect_transport_websocket(self, import_module, AsyncSocket):
== packet.OPEN
)
- @mock.patch('engineio.asyncio_socket.AsyncSocket')
@mock.patch('importlib.import_module')
- def test_http_upgrade_case_insensitive(self, import_module, AsyncSocket):
+ @mock.patch('engineio.asyncio_server.asyncio_socket.AsyncSocket')
+ def test_http_upgrade_case_insensitive(self, AsyncSocket, import_module):
a = self.get_async_mock(
{
'REQUEST_METHOD': 'GET',
@@ -334,11 +334,10 @@ def test_http_upgrade_case_insensitive(self, import_module, AsyncSocket):
== packet.OPEN
)
- @mock.patch('engineio.asyncio_socket.AsyncSocket')
@mock.patch('importlib.import_module')
+ @mock.patch('engineio.asyncio_server.asyncio_socket.AsyncSocket')
def test_connect_transport_websocket_closed(
- self, import_module, AsyncSocket
- ):
+ self, AsyncSocket, import_module):
a = self.get_async_mock(
{
'REQUEST_METHOD': 'GET',