def testGetFormatStringAttributeNames(self): """Tests the GetFormatStringAttributeNames function.""" event_formatter = test_lib.TestEventFormatter() expected_attribute_names = [u'text'] attribute_names = event_formatter.GetFormatStringAttributeNames() self.assertEqual(sorted(attribute_names), expected_attribute_names)
def testGetMessages(self): """Tests the GetMessages function.""" formatter_mediator = mediator.FormatterMediator() event_formatter = test_lib.TestEventFormatter() _, event_data, _ = containers_test_lib.CreateEventFromValues( self._TEST_EVENTS[0]) message, _ = event_formatter.GetMessages(formatter_mediator, event_data) self.assertEqual( message, 'but we\'re still trying to say something about the event')
def testInitialization(self): """Tests the initialization.""" event_formatter = test_lib.TestEventFormatter() self.assertIsNotNone(event_formatter)