test_queue: Fix ConnectionClosed usage.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-08-02 18:57:47 -07:00 committed by Tim Abbott
parent 9f8ba913fd
commit f87a0e912b
1 changed files with 1 additions and 1 deletions

View File

@ -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(