@given(device=device_path)
    def test_unexpected_attach_exception(self, device):
        def attach_volume(blockdevice_id, compute_id, device):
            raise CustomException("Fake failure generated by test")

        self.assertRaises(
            CustomException,
            _attach_volume_and_wait_for_device,
            volume=self.volume,
            attach_to=self.compute_id,
            attach_volume=attach_volume,
            detach_volume=lambda *a, **kw: None,
            device=device,
            blockdevices=[],
        )
If the ``attach_volume`` function raises an unexpected exception, it is
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/test/test_ebs.py/AttachVolumeAndWaitTests.test_unexpected_attach_exception