

def _basicConnectTest(self, check):
    "\n        Helper for implementing a test to verify that one of the I{connect}\n        methods of L{ClientCreator} passes the right arguments to the right\n        reactor method.\n\n        @param check: A function which will be invoked with a reactor and a\n            L{ClientCreator} instance and which should call one of the\n            L{ClientCreator}'s I{connect} methods and assert that all of its\n            arguments except for the factory are passed on as expected to the\n            reactor.  The factory should be returned.\n        "

    class SomeProtocol(Protocol):
        pass
    reactor = MemoryReactorClock()
    cc = ClientCreator(reactor, SomeProtocol)
    factory = check(reactor, cc)
    protocol = factory.buildProtocol(None)
    reactor.assertIsInstance(protocol, SomeProtocol)

dataset/ETHPy150Open twisted/twisted/twisted/internet/test/test_protocol.py ClientCreatorTests._basicConnectTest/VarMisuse@59/259 `self`->`reactor`