|
@ -267,6 +267,7 @@ class TestAsyncServer(unittest.TestCase): |
|
|
handler.assert_called_once_with('123', 'environ') |
|
|
handler.assert_called_once_with('123', 'environ') |
|
|
self.assertEqual(s.manager.connect.call_count, 1) |
|
|
self.assertEqual(s.manager.connect.call_count, 1) |
|
|
self.assertEqual(s.manager.disconnect.call_count, 1) |
|
|
self.assertEqual(s.manager.disconnect.call_count, 1) |
|
|
|
|
|
self.assertEqual(s.environ, {}) |
|
|
s.eio.send.mock.assert_called_once_with('123', '4', binary=False) |
|
|
s.eio.send.mock.assert_called_once_with('123', '4', binary=False) |
|
|
|
|
|
|
|
|
def test_handle_connect_namespace_rejected(self, eio): |
|
|
def test_handle_connect_namespace_rejected(self, eio): |
|
@ -279,6 +280,7 @@ class TestAsyncServer(unittest.TestCase): |
|
|
_run(s._handle_eio_message('123', '0/foo')) |
|
|
_run(s._handle_eio_message('123', '0/foo')) |
|
|
self.assertEqual(s.manager.connect.call_count, 2) |
|
|
self.assertEqual(s.manager.connect.call_count, 2) |
|
|
self.assertEqual(s.manager.disconnect.call_count, 1) |
|
|
self.assertEqual(s.manager.disconnect.call_count, 1) |
|
|
|
|
|
self.assertEqual(s.environ, {}) |
|
|
s.eio.send.mock.assert_any_call('123', '4/foo', binary=False) |
|
|
s.eio.send.mock.assert_any_call('123', '4/foo', binary=False) |
|
|
|
|
|
|
|
|
def test_handle_disconnect(self, eio): |
|
|
def test_handle_disconnect(self, eio): |
|
|