Пример #1
0
def test_duplicate_message(test, sent_message_name, received_message_name, expected=True):
    sent_message = parsed_messages[sent_message_name]
    received_message = parsed_messages[received_message_name]
    is_same = Message.is_same_message(sent_message, received_message)

    fail_response = (
        "Message function is_same_message returned "
        + str(is_same)
        + " instead of "
        + str(expected)
        + " when sent message is "
        + repr(sent_message_name)
        + " and received message is "
        + repr(received_message_name)
    )
    test.assertEqual(is_same, expected, fail_response)
Пример #2
0
 def _test_create_message(self, expected_type, log_entry):
     message_object = Message.create_message(log_entry)
     self.assertIs(type(message_object), expected_type)