def mkExtractAssocMissingTest(keys):
 def test(self):
  msg = mkAssocResponse(*keys)
  self.failUnlessRaises(KeyError, self.consumer._extractAssociation, msg, None)
 return test

def mkExtractAssocMissingTest ( keys ) : def test ( self ) : msg = mkAssocResponse ( * keys ) self . failUnlessRaises ( KeyError , self . consumer . _extractAssociation , msg , None ) return test
factory function for creating test methods for generating missing field tests .