'``DetachVolume.run`` uses the deployer\'s ``IBlockDeviceAPI`` to detach
its volume from the deployer\'s node.'

def test_run(self):

    dataset_id = uuid4()
    deployer = create_blockdevicedeployer(self, hostname=u'192.0.2.1')
    api = deployer.block_device_api
    volume = api.create_volume(dataset_id=dataset_id, size=LOOPBACK_MINIMUM_ALLOCATABLE_SIZE)
    api.attach_volume(volume.blockdevice_id, attach_to=api.compute_instance_id())
    change = DetachVolume(dataset_id=dataset_id, blockdevice_id=volume.blockdevice_id)
    self.successResultOf(run_state_change(change, deployer, InMemoryStatePersister()))
    [listed_volume] = api.list_volumes()
    self.assertIs(None, listed_volume.attached_to)
