Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_queue: Fix ConnectionClosed usage.

Anders Kaseorgf87a0e912ba1
diff --git a/zerver/tests/test_queue.py b/zerver/tests/test_queue.py
index bdae3247766..89e328eb543 100644
--- a/zerver/tests/test_queue.py
+++ b/zerver/tests/test_queue.py
@@ -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(