'``update_node()`` retains the existing ``Deployment``\'s leases
and does not transform them.'

def test_update_node_retains_leases(self):

    node = Node(hostname=u'node1.example.com', applications={u'postgresql-clusterhq': Application(name=u'postgresql-clusterhq', image=DockerImage.from_string(u'image'))})
    another_node = Node(hostname=u'node2.example.com', applications={u'site-clusterhq.com': Application(name=u'site-clusterhq.com', image=DockerImage.from_string(u'image'))})
    dataset_id = uuid4()
    leases = Leases()
    leases = leases.acquire(datetime.datetime.now(), dataset_id, node.uuid, 60)
    original = Deployment(nodes=frozenset([node]), leases=leases)
    updated = original.update_node(another_node)
    self.assertEqual(original.leases, updated.leases)
