human
Complete this python program:
def buildIntegrationTests(mixinClass, name, fixture):
assistant
#Here is the Python code you requested.

    """Build L{AsyncTestCase} classes that runs the tests in the mixin class with
    both real and in-memory queries.
    @param mixinClass: A mixin class for L{AsyncTestCase} that relies on having
    a C{self.scenario}.
    @param name: A C{str}, the name of the test category.
    :param fixture: A callable that takes an ``AsyncTestCase`` and returns a
    ``klein.Klein`` object.
    @return: A pair of L{AsyncTestCase} classes.
    """
    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)