test_notifications: Don't pass a user_profile to client_patch.

This fixes a JSON overflow error when producing URL coverage reports.
This commit is contained in:
Tim Abbott
2017-03-23 13:06:04 -07:00
parent 49f5be1dba
commit 97e844e97c

View File

@@ -124,11 +124,10 @@ class TestMissedMessages(ZulipTestCase):
msg_id = self.send_message("othello@zulip.com", "denmark", Recipient.STREAM,
'@**hamlet** to be deleted')
othello = get_user_profile_by_email('othello@zulip.com')
hamlet = get_user_profile_by_email('hamlet@zulip.com')
self.login("othello@zulip.com")
result = self.client_patch('/json/messages/' + str(msg_id),
{'message_id': msg_id, 'content': ' ', 'user_profile': othello})
{'message_id': msg_id, 'content': ' '})
self.assert_json_success(result)
handle_missedmessage_emails(hamlet.id, [{'message_id': msg_id}])
self.assertEqual(len(mail.outbox), 0)
@@ -142,11 +141,10 @@ class TestMissedMessages(ZulipTestCase):
msg_id = self.send_message("othello@zulip.com", "hamlet@zulip.com", Recipient.PERSONAL,
'Extremely personal message! to be deleted!')
othello = get_user_profile_by_email('othello@zulip.com')
hamlet = get_user_profile_by_email('hamlet@zulip.com')
self.login("othello@zulip.com")
result = self.client_patch('/json/messages/' + str(msg_id),
{'message_id': msg_id, 'content': ' ', 'user_profile': othello})
{'message_id': msg_id, 'content': ' '})
self.assert_json_success(result)
handle_missedmessage_emails(hamlet.id, [{'message_id': msg_id}])
self.assertEqual(len(mail.outbox), 0)
@@ -160,12 +158,11 @@ class TestMissedMessages(ZulipTestCase):
msg_id = self.send_message("othello@zulip.com", ["hamlet@zulip.com", "iago@zulip.com"],
Recipient.PERSONAL, 'Group personal message!')
othello = get_user_profile_by_email('othello@zulip.com')
hamlet = get_user_profile_by_email('hamlet@zulip.com')
iago = get_user_profile_by_email('iago@zulip.com')
self.login("othello@zulip.com")
result = self.client_patch('/json/messages/' + str(msg_id),
{'message_id': msg_id, 'content': ' ', 'user_profile': othello})
{'message_id': msg_id, 'content': ' '})
self.assert_json_success(result)
handle_missedmessage_emails(hamlet.id, [{'message_id': msg_id}])
self.assertEqual(len(mail.outbox), 0)