'Verify create volume from image will cause an error.'

def test_create_volume_with_deleted_imaged(self):

    class _ModifiedFakeImageService(FakeImageService, ):
        def show(self, context, image_id):
            return {'size': (2 * units.Gi), 'disk_format': 'raw', 'container_format': 'bare', 'min_disk': 5, 'status': 'deleted'}
    volume_api = cinder.volume.api.API(image_service=_ModifiedFakeImageService())
    self.assertRaises(exception.InvalidInput, volume_api.create, self.context, 2, 'name', 'description', image_id=1)
