forked from pool/python-python-engineio
- version 4,11,2
* Fix incorrect disconnection reason reported when browser page is closed (commit) * Remove debugging prints 😊 (commit) * Pass a reason argument to the disconnect handler #393 (commit) * Add maxPayload to connection response #392 (commit) (thanks HeySMMReseller & HeySMMProvider!) * Client option to disable timestamps in connection URLs #386 (commit) * Return disconnected sessions as 400 errors #391 (commit) * Handle unicode errors in ASGI driver #389 (commit) * Replaced deprecated get_event_loop with get_running_loop #384 (commit) * Remove constructs required by older, now unsupported Python versions (commit) * Switched to pyenv-asyncio for async unit tests (commit) * Adopted unittest.mock.AsyncMock in async unit tests instead of homegrown version (commit) * Removed tests dependency on unittest.TestCase base class (commit) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-engineio?expand=0&rev=20
This commit is contained in:
54
python-311.patch
Normal file
54
python-311.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
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',
|
Reference in New Issue
Block a user