From 97e844e97c562dc1f4f3895afbbb223b30e63505 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 23 Mar 2017 13:06:04 -0700 Subject: [PATCH] test_notifications: Don't pass a user_profile to client_patch. This fixes a JSON overflow error when producing URL coverage reports. --- zerver/tests/test_notifications.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/zerver/tests/test_notifications.py b/zerver/tests/test_notifications.py index 65446cc85f..ac5d9658d2 100644 --- a/zerver/tests/test_notifications.py +++ b/zerver/tests/test_notifications.py @@ -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)