'``list_volumes`` returns a ``BlockVolume`` for each attached volume
file.'

def test_list_attached_volumes(self):

    expected_size = self.minimum_allocatable_size
    expected_dataset_id = uuid4()
    this_node = self.api.compute_instance_id()
    blockdevice_volume = _blockdevicevolume_from_dataset_id(size=expected_size, attached_to=this_node, dataset_id=expected_dataset_id)
    host_dir = self.api._root_path.descendant(['attached', this_node.encode('utf-8')])
    host_dir.makedirs()
    filename = _backing_file_name(blockdevice_volume)
    with host_dir.child(filename).open('wb') as f:
        f.truncate(expected_size)
    self.assertEqual([blockdevice_volume], self.api.list_volumes())
