MCPcopy Create free account
hub / github.com/miguelgrinberg/python-socketio / test_handle_error

Method test_handle_error

tests/common/test_client.py:940–950  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

938 assert 123 in c.callbacks['/foo']
939
940 def test_handle_error(self):
941 c = client.Client()
942 c.connected = True
943 c.namespaces = {'/foo': '1', '/bar': '2'}
944 c._connect_event = mock.MagicMock()
945 c._trigger_event = mock.MagicMock()
946 c._handle_error('/', 'error')
947 assert c.namespaces == {}
948 assert not c.connected
949 c._connect_event.set.assert_called_once_with()
950 c._trigger_event.assert_called_once_with('connect_error', '/', 'error')
951
952 def test_handle_error_with_no_arguments(self):
953 c = client.Client()

Callers

nothing calls this directly

Calls 1

_handle_errorMethod · 0.95

Tested by

no test coverage detected