'Attempting to attach a volume to a non-local instance will
raise an ``AttachUnexpectedInstance`` error.'

def test_attach_foreign_instance_error(self):

    dataset_id = uuid4()
    volume = self.api.create_volume(dataset_id=dataset_id, size=ONE_GIB)
    self.addCleanup(self.api.destroy_volume, volume.blockdevice_id)
    bad_instance_id = u'i-12345678'
    self.assertRaises(AttachUnexpectedInstance, self.api.attach_volume, volume.blockdevice_id, bad_instance_id)
