def buildIntegrationTests(mixinClass, name, fixture):
 class RealTests(mixinClass, AsyncTestCase, ):
  '\n        Tests that endpoints are available over the network interfaces that\n        real API users will be connecting from.\n        '
  def setUp(self):
   self.app = fixture(self)
   self.port = reactor.listenTCP(0, Site(self.app.resource()), interface='127.0.0.1')
   self.addCleanup(self.port.stopListening)
   portno = self.port.getHost().port
   self.agent = ProxyAgent(TCP4ClientEndpoint(reactor, '127.0.0.1', portno), reactor)
   super(RealTests, self).setUp()
 class MemoryTests(mixinClass, AsyncTestCase, ):
  '\n        Tests that endpoints are available in the appropriate place, without\n        testing that the correct network interfaces are listened on.\n        '
  def setUp(self):
   self.app = fixture(self)
   self.agent = MemoryAgent(self.app.resource())
   super(MemoryTests, self).setUp()
 RealTests.__name__ += name
 MemoryTests.__name__ += name
 RealTests.__module__ = mixinClass.__module__
 MemoryTests.__module__ = mixinClass.__module__
 return (RealTests, MemoryTests)

def buildIntegrationTests ( mixinClass , name , fixture ) : class RealTests ( mixinClass , AsyncTestCase , ) : def setUp ( self ) : self . app = fixture ( self ) self . port = reactor . listenTCP ( 0 , Site ( self . app . resource ( ) ) , interface = '127.0.0.1' ) self . addCleanup ( self . port . stopListening ) portno = self . port . getHost ( ) . port self . agent = ProxyAgent ( TCP4ClientEndpoint ( reactor , '127.0.0.1' , portno ) , reactor ) super ( RealTests , self ) . setUp ( ) class MemoryTests ( mixinClass , AsyncTestCase , ) : def setUp ( self ) : self . app = fixture ( self ) self . agent = MemoryAgent ( self . app . resource ( ) ) super ( MemoryTests , self ) . setUp ( ) RealTests . __name__ += name MemoryTests . __name__ += name RealTests . __module__ = mixinClass . __module__ MemoryTests . __module__ = mixinClass . __module__ return ( RealTests , MemoryTests )
build l{asynctestcase} classes that runs the tests in the mixin class with both real and in-memory queries .