Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
typing: Avoid redefinition of variables with a different type.
Zixuan James Lifd8f049a8dd4
diff --git a/zerver/tests/test_event_system.py b/zerver/tests/test_event_system.pyindex 427054f6a5b..4de2c57eb39 100644--- a/zerver/tests/test_event_system.py+++ b/zerver/tests/test_event_system.py@@ -215,10 +215,10 @@ class EventsEndpointTest(ZulipTestCase):post_data["secret"] = "random"req = HostRequestMock(post_data, user_profile=None)req.META["REMOTE_ADDR"] = "127.0.0.1"- with self.assertRaises(AccessDeniedError) as context:+ with self.assertRaises(AccessDeniedError) as access_denied_error:result = self.client_post_request("/notify_tornado", req)- self.assertEqual(str(context.exception), "Access denied")- self.assertEqual(context.exception.http_status_code, 403)+ self.assertEqual(str(access_denied_error.exception), "Access denied")+ self.assertEqual(access_denied_error.exception.http_status_code, 403)assert settings.SHARED_SECRET is not Nonepost_data["secret"] = settings.SHARED_SECRET