def METHOD_NAME(self):
    """Tests that all messages can be deleted by type"""
    # Arrange
    self.send_multiple_welcome_messages(3)
    test_user_2 = return_canned_user("test_user_2", 222222222)
    test_user_2.create()
    MessageService.send_team_join_notification(
        test_user_2.id,
        test_user_2.username,
        self.test_user.id,
        "test_team",
        10,
        "MANAGER",
    )
    # Act
    Message.delete_all_messages(self.test_user.id, [MessageType.SYSTEM.value])
    # Assert
    messages = Message.get_all_messages(self.test_user.id)
    # Since we deleted all system messages, there should be Invitation message left
    self.assertEqual(len(messages.user_messages), 1)
    self.assertEqual(
        messages.user_messages[0].message_type,
        MessageType.INVITATION_NOTIFICATION.name,
    )