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

def test_error_on_environment_var_name_not_stringtypes(self):

    config = {u'mysql-hybridcluster': {u'image': u'clusterhq/mysql', u'environment': {56: u'test'}}}
    error_message = u"Application    'mysql-hybridcluster'    has    a    config    error.    Environment    variable    name    must    be    a    string;    got    type    'int'."
    parser = FlockerConfiguration(config)
    exception = self.assertRaises(ConfigurationError, parser._parse_environment_config, u'mysql-hybridcluster', config[u'mysql-hybridcluster'])
    self.assertEqual(exception.message, error_message)
