'A fig-compatible application definition may not have both "image" and
"build" keys.'

def test_invalid_fig_config_image_and_build(self):

    config = {u'postgres': {u'build': u'.', u'image': u'sample/postgres'}}
    parser = FigConfiguration(config)
    exception = self.assertRaises(ConfigurationError, parser.is_valid_format)
    error_message = u"Application    'postgres'    has    a    config    error.    Must    specify    either    'build'    or    'image';    found    both."
    self.assertEqual(exception.message, error_message)
