diff --git a/zerver/tests/test_gitter_importer.py b/zerver/tests/test_gitter_importer.py index 8233f87e80..061e46eea2 100644 --- a/zerver/tests/test_gitter_importer.py +++ b/zerver/tests/test_gitter_importer.py @@ -107,7 +107,7 @@ class GitterImporter(ZulipTestCase): messages["zerver_usermessage"], "user_profile" ) self.assertEqual( - set([user_should_not_be_long_term_idle["id"]]), exported_usermessage_userprofile + {user_should_not_be_long_term_idle["id"]}, exported_usermessage_userprofile ) exported_usermessage_message = self.get_set(messages["zerver_usermessage"], "message") self.assertEqual(exported_usermessage_message, exported_messages_id) diff --git a/zerver/tests/test_import_export.py b/zerver/tests/test_import_export.py index 61ac2eb6ed..14274c33d0 100644 --- a/zerver/tests/test_import_export.py +++ b/zerver/tests/test_import_export.py @@ -678,13 +678,13 @@ class RealmImportExportTest(ExportFile): .values_list("id", flat=True) ) - exported_msg_ids = ( - set(public_stream_message_ids) - | set(private_stream_message_ids) - | set([stream_b_second_message_id]) - | set(exported_pm_ids) - | set(exported_huddle_ids) - ) + exported_msg_ids = { + *public_stream_message_ids, + *private_stream_message_ids, + stream_b_second_message_id, + *exported_pm_ids, + *exported_huddle_ids, + } self.assertEqual(self.get_set(data["zerver_message"], "id"), exported_msg_ids) self.assertNotIn(stream_b_first_message_id, exported_msg_ids)