'``Configuration.applications`` raises a
``ConfigurationError`` if the application_configuration has a link
whose alias includes a hyphen.'

def test_links_alias_with_hyphen(self):

    config = dict(version=1, applications={u'postgres': dict(image=u'busybox', links=[{u'local_port': 90, u'remote_port': 100, u'alias': u'x-y'}])})
    parser = FlockerConfiguration(config)
    exception = self.assertRaises(ConfigurationError, parser.applications)
    self.assertEqual(u"Application    'postgres'    has    a    config    error.    Invalid    links    specification.    Link    aliases    must    be    alphanumeric.", exception.message)
