'``deployment_from_configuration`` raises a ``ConfigurationError`` if
the deployment_configuration refers to an application more than
once.'

def test_error_on_duplicate_application_name(self):

    applications = {u'app': Application(name=u'app', image=DockerImage.from_string(u'busybox'))}
    exception = self.assertRaises(ConfigurationError, deployment_from_configuration, DeploymentState(nodes=[NodeState(hostname=u'1.2.3.4', uuid=uuid4()), NodeState(hostname=u'1.2.3.5', uuid=uuid4())]), dict(version=1, nodes={u'1.2.3.4': [u'app'], u'1.2.3.5': [u'app']}), applications)
    self.assertEqual(u"Application    'app'    appears    more    than    once.", exception.message)
