'Moving an ``Application`` from one node to another not previously in
this deployment results in a new ``Deployment`` instance reflecting
the updated configuration.'

def test_move_application_new_node(self):

    application = Application(name=u'mycontainer', image=DockerImage.from_string(u'busybox'))
    original_nodes = [Node(hostname=u'192.0.2.1', applications={application.name: application}), Node(hostname=u'192.0.2.2', applications={})]
    updated_nodes = [Node(hostname=u'192.0.2.1', applications={}), Node(hostname=u'192.0.2.2', applications={}), Node(hostname=u'192.0.2.3', applications={application.name: application})]
    original = Deployment(nodes=original_nodes)
    expected = Deployment(nodes=updated_nodes)
    updated = original.move_application(application, Node(hostname=u'192.0.2.3'))
    self.assertEqual(updated, expected)
