logging: Remove unnecessary mock.patch() for logging.

Our test-backend validation confirms that we don't log anything to
stdout in the tests, so the fact that CI passes with this removes
shows there was nothing being logged.
This commit is contained in:
m-e-l-u-h-a-n 2020-10-28 15:02:49 +05:30 committed by Tim Abbott
parent 26832b6a6f
commit be7a70e742
2 changed files with 2 additions and 4 deletions

View File

@ -32,8 +32,7 @@ class EmailLogTest(ZulipTestCase):
self.assertEqual(get_forward_address(), forward_address)
with self.settings(EMAIL_BACKEND='zproject.email_backends.EmailLogBackEnd'), \
mock.patch('logging.info', return_value=None):
with self.settings(EMAIL_BACKEND='zproject.email_backends.EmailLogBackEnd'):
with mock.patch('zproject.email_backends.EmailLogBackEnd.send_email_smtp'):
result = self.client_get('/emails/generate/')
self.assertEqual(result.status_code, 302)

View File

@ -422,8 +422,7 @@ class UserGroupAPITestCase(ZulipTestCase):
content=content_with_group_mention,
)
with mock.patch('logging.info'):
result = self.api_post(sender, "/json/messages", payload)
result = self.api_post(sender, "/json/messages", payload)
self.assert_json_success(result)