mirror of https://github.com/zulip/zulip.git
test_queue: Fix ConnectionClosed usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
9f8ba913fd
commit
f87a0e912b
|
@ -18,7 +18,7 @@ class TestTornadoQueueClient(ZulipTestCase):
|
|||
@mock.patch("zerver.lib.queue.ExceptionFreeTornadoConnection", autospec=True)
|
||||
def test_on_open_closed(self, mock_cxn: mock.MagicMock) -> None:
|
||||
with self.assertLogs("zulip.queue", "WARNING") as m:
|
||||
mock_cxn().channel.side_effect = ConnectionClosed("500", "test")
|
||||
mock_cxn().channel.side_effect = ConnectionClosed(500, "test")
|
||||
connection = TornadoQueueClient()
|
||||
connection._on_open(mock.MagicMock())
|
||||
self.assertEqual(
|
||||
|
|
Loading…
Reference in New Issue