'Test the behavior of calling `add_messages` with combination of `StudioValidation` instances.'

def test_add_messages(self):

    validation_1 = StudioValidation('id')
    validation_1.set_summary(StudioValidationMessage(StudioValidationMessage.WARNING, u'Summary    message'))
    validation_1.add(StudioValidationMessage(StudioValidationMessage.ERROR, u'Error    message'))
    validation_2 = StudioValidation('id')
    validation_2.set_summary(StudioValidationMessage(StudioValidationMessage.ERROR, u'Summary    2    message'))
    validation_2.add(StudioValidationMessage(StudioValidationMessage.NOT_CONFIGURED, u'Not    configured'))
    validation_1.add_messages(validation_2)
    self.assertEqual(2, len(validation_1.messages))
    self.assertEqual(StudioValidationMessage.ERROR, validation_1.messages[0].type)
    self.assertEqual(u'Error    message', validation_1.messages[0].text)
    self.assertEqual(StudioValidationMessage.NOT_CONFIGURED, validation_1.messages[1].type)
    self.assertEqual(u'Not    configured', validation_1.messages[1].text)
    self.assertEqual(StudioValidationMessage.WARNING, validation_1.summary.type)
    self.assertEqual(u'Summary    message', validation_1.summary.text)
