'``datasets_from_deployment`` returns dataset dictionaries for the
volumes attached to applications on all nodes.'

def test_application_volumes(self):

    expected_uuid = uuid4()
    expected_dataset = Dataset(dataset_id=u'jalkjlk')
    volume = AttachedVolume(manifestation=Manifestation(dataset=expected_dataset, primary=True), mountpoint=FilePath('/blah'))
    node = Node(uuid=expected_uuid, applications={a.name: a for a in [Application(name=u'mysql-clusterhq', image=DockerImage.from_string(u'xxx')), Application(name=u'site-clusterhq.com', image=DockerImage.from_string(u'xxx'), volume=volume)]}, manifestations={expected_dataset.dataset_id: volume.manifestation})
    deployment = Deployment(nodes=frozenset([node]))
    expected = dict(dataset_id=expected_dataset.dataset_id, primary=unicode(expected_uuid), metadata=thaw(expected_dataset.metadata), deleted=False)
    self.assertEqual([expected], list(datasets_from_deployment(deployment)))
