'Verifies that each user message function returns the correct type.'

@ddt.data((PageLevelMessages.register_error_message, UserMessageType.ERROR), (PageLevelMessages.register_info_message, UserMessageType.INFO), (PageLevelMessages.register_success_message, UserMessageType.SUCCESS), (PageLevelMessages.register_warning_message, UserMessageType.WARNING))
@ddt.unpack
def test_message_type(self, register_message_function, expected_message_type):

    register_message_function(self.request, TEST_MESSAGE)
    messages = list(PageLevelMessages.user_messages(self.request))
    self.assertEqual(len(messages), 1)
    self.assertEquals(messages[0].type, expected_message_type)
