'``BlockDeviceDeployer.calculate_changes`` recognizes a volume that is
attached but not mounted which is associated with a dataset configured
to have a deleted manifestation on the deployer\'s node and returns a
state change to detach the volume.'

def test_detach_deleted_manifestation(self):

    node_state = NodeState(uuid=self.NODE_UUID, hostname=self.NODE, applications=None, manifestations={}, devices={self.DATASET_ID: FilePath('/dev/xda')}, paths={})
    node_config = Node(uuid=self.NODE_UUID, hostname=self.NODE, manifestations={unicode(self.DATASET_ID): Manifestation(dataset=Dataset(dataset_id=unicode(self.DATASET_ID), deleted=True), primary=True)})
    assert_calculated_changes(self, node_state, node_config, {Dataset(dataset_id=unicode(self.DATASET_ID))}, in_parallel(changes=[DetachVolume(dataset_id=self.DATASET_ID, blockdevice_id=self.BLOCKDEVICE_ID)]))
