|
45 | 45 | from zerver.models.users import get_system_bot
|
46 | 46 |
|
47 | 47 | # Class with helper functions useful for testing archiving of reactions:
|
48 |
| -from zerver.tornado.django_api import send_event |
49 | 48 |
|
50 | 49 | ZULIP_REALM_DAYS = 30
|
51 | 50 | MIT_REALM_DAYS = 100
|
@@ -1152,28 +1151,3 @@ def test_do_delete_messages_multiple(self) -> None:
|
1152 | 1151 | archived_messages = ArchivedMessage.objects.filter(id__in=message_ids)
|
1153 | 1152 | self.assertEqual(archived_messages.count(), len(message_ids))
|
1154 | 1153 | self.assert_length({message.archive_transaction_id for message in archived_messages}, 1)
|
1155 |
| - |
1156 |
| - def test_old_event_format_processed_correctly(self) -> None: |
1157 |
| - """ |
1158 |
| - do_delete_messages used to send events with users in dict format {"id": <int>}. |
1159 |
| - We have a block in process_notification to deal with that old format, that should be |
1160 |
| - deleted in a later release. This test is meant to ensure correctness of that block. |
1161 |
| - """ |
1162 |
| - realm = get_realm("zulip") |
1163 |
| - cordelia = self.example_user("cordelia") |
1164 |
| - hamlet = self.example_user("hamlet") |
1165 |
| - message_id = self.send_personal_message(cordelia, hamlet) |
1166 |
| - message = Message.objects.get(id=message_id) |
1167 |
| - |
1168 |
| - event = { |
1169 |
| - "type": "delete_message", |
1170 |
| - "sender": message.sender.email, |
1171 |
| - "sender_id": message.sender_id, |
1172 |
| - "message_id": message.id, |
1173 |
| - "message_type": "private", |
1174 |
| - "recipient_id": message.recipient_id, |
1175 |
| - } |
1176 |
| - move_messages_to_archive([message_id]) |
1177 |
| - # We only send the event to see no exception is thrown - as it would be if the block |
1178 |
| - # in process_notification to handle this old format of "users to notify" wasn't correct. |
1179 |
| - send_event(realm, event, [{"id": cordelia.id}, {"id": hamlet.id}]) |
0 commit comments