'A single fig application configuration is not valid if it contains
any keys besides "image", "environment", "ports", "volumes" or
"links". If an invalid key is detected, ``ConfigurationError``
is raised.'

def test_invalid_fig_config_unrecognised_key(self):

    config = {u'wordpress': {u'environment': {u'WORDPRESS_ADMIN_PASSWORD': u'admin'}, u'volumes': [u'/var/www/wordpress'], u'image': u'sample/wordpress', u'ports': [u'8080:80'], u'foo': u'bar', u'spam': u'eggs'}}
    parser = FigConfiguration(config)
    exception = self.assertRaises(ConfigurationError, parser.applications)
    error_message = u"Application    'wordpress'    has    a    config    error.    Unrecognised    keys:    foo,    spam"
    self.assertEqual(exception.message, error_message)
