

@mock.patch.object(base, 'obj_to_primitive')
def test_to_legacy_image_with_none(self, obj_to_primitive):
    spec = objects.RequestSpec(image=None)
    self.assertEqual({
        
    }, spec._to_legacy_image())
    self.assertFalse(obj_to_primitive.called)

dataset/ETHPy150Open openstack/nova/nova/tests/unit/objects/test_request_spec.py _TestRequestSpecObject.test_to_legacy_image_with_none/original