def stubout_lookup_image(stubs):
 def f(_1, _2, _3, _4):
  raise Exception('Test Exception raised by fake lookup_image')
 stubs.Set(vm_utils, 'lookup_image', f)

def stubout_lookup_image ( stubs ) : def f ( _1 , _2 , _3 , _4 ) : raise Exception ( 'Test Exception raised by fake lookup_image' ) stubs . Set ( vm_utils , 'lookup_image' , f )
simulates a failure in lookup image .