diff --git a/zerver/tests/test_message_move_topic.py b/zerver/tests/test_message_move_topic.py index 85cb456..30687d2 100644 --- a/zerver/tests/test_message_move_topic.py +++ b/zerver/tests/test_message_move_topic.py @@ -464,13 +464,13 @@ class MessageMoveTopicTest(ZulipTestCase): for call_args in mock_send_event_on_commit.call_args_list: (_arg_realm, arg_event, arg_notified_users) = call_args[0] [notified_user_id] = arg_notified_users - if arg_event["type"] == "user_topic": - self.assertEqual(arg_event["stream_id"], stream.id) + if arg_event.type == "user_topic": + self.assertEqual(arg_event.stream_id, stream.id) user_topic_events[notified_user_id].append( - (arg_event["topic_name"], arg_event["visibility_policy"]) + (arg_event.topic_name, arg_event.visibility_policy) ) - elif arg_event["type"] == "muted_topics": - muted_topics_events[notified_user_id].append(arg_event["muted_topics"]) + elif arg_event.type == "muted_topics": + muted_topics_events[notified_user_id].append(arg_event.muted_topics) self.assertEqual( user_topic_events[hamlet.id], [ @@ -597,9 +597,9 @@ class MessageMoveTopicTest(ZulipTestCase): users_notified_via_user_topic_event: list[int] = [] for call_args in mock_send_event_on_commit.call_args_list: (_arg_realm, arg_event, arg_notified_users) = call_args[0] - if arg_event["type"] == "user_topic": + if arg_event.type == "user_topic": users_notified_via_user_topic_event.append(*arg_notified_users) - elif arg_event["type"] == "muted_topics": + elif arg_event.type == "muted_topics": users_notified_via_muted_topics_event.append(*arg_notified_users) self.assertEqual( sorted(users_notified_via_muted_topics_event), @@ -859,9 +859,9 @@ class MessageMoveTopicTest(ZulipTestCase): users_notified_via_user_topic_event: list[int] = [] for call_args in mock_send_event_on_commit.call_args_list: (_arg_realm, arg_event, arg_notified_users) = call_args[0] - if arg_event["type"] == "user_topic": + if arg_event.type == "user_topic": users_notified_via_user_topic_event.append(*arg_notified_users) - elif arg_event["type"] == "muted_topics": + elif arg_event.type == "muted_topics": users_notified_via_muted_topics_event.append(*arg_notified_users) self.assertEqual( sorted(users_notified_via_muted_topics_event),