'A single fig application configuration is not valid if it does not
contain exactly one of an "image" key.
If this is detected, ``ConfigurationError``        is raised.
This condition can occur if ``_is_fig_configuration`` has
detected a potentially valid fig-style configuration in that there
is at least one application that meets the requirement of having an
image or build key, but the overall configuration also contains
another application that does not have a required key.'

def test_invalid_fig_config_missing_image_or_build(self):

    config = {u'postgres': {u'image': u'sample/postgres'}, u'wordpress': {u'ports': [u'8080:80'], u'volumes': [u'/var/www/wordpress']}}
    parser = FigConfiguration(config)
    exception = self.assertRaises(ConfigurationError, parser.applications)
    error_message = u"Application    'wordpress'    has    a    config    error.    Application    configuration    must    contain    either    an    'image'    or    'build'    key."
    self.assertEqual(exception.message, error_message)
