From d1cb039c2c43e31b7a661c4305d5689104a24635 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 20 Oct 2017 09:16:38 -0700 Subject: [PATCH] test_management_commands: Add check for expected system exit. This was missed in the recent improvements to send_webhook_fixture_message. --- zerver/tests/test_management_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zerver/tests/test_management_commands.py b/zerver/tests/test_management_commands.py index 0c8882c16c..f5f00a8858 100644 --- a/zerver/tests/test_management_commands.py +++ b/zerver/tests/test_management_commands.py @@ -176,7 +176,8 @@ class TestSendWebhookFixtureMessage(TestCase): client = client_mock() - call_command(self.COMMAND_NAME, fixture=self.fixture_path, url=self.url) + with self.assertRaises(SystemExit): + call_command(self.COMMAND_NAME, fixture=self.fixture_path, url=self.url) self.assertTrue(ujson_mock.dumps.called) self.assertTrue(ujson_mock.loads.called) self.assertTrue(open_mock.called)