'``Configuration._applications.from_configuration`` raises a
``ConfigurationError`` if the application_configuration\'s
``u"environment"`` key is not a dictionary.'

def test_error_on_environment_vars_not_dict(self):

    config = {u'mysql-hybridcluster': {u'image': u'clusterhq/mysql', u'environment': u'foobar'}}
    parser = FlockerConfiguration(config)
    exception = self.assertRaises(ConfigurationError, parser._parse_environment_config, u'mysql-hybridcluster', config[u'mysql-hybridcluster'])
    self.assertEqual(u"Application    'mysql-hybridcluster'    has    a    config    error.    'environment'    must    be    a    dictionary    of    key/value    pairs;    got    type    'unicode'.", exception.message)
