'This test checks that we correctly get notifications event for a
client.  This ought to prevent a regression under Windows using the
GTK2 reactor.  See #3925.'

def test_connectEvent(self):

    reactor = self.buildReactor()
    self.listen(reactor, ServerFactory.forProtocol(Protocol))
    connected = []
    class CheckConnection(Protocol, ):
        def connectionMade(self):
            connected.append(self)
            reactor.stop()
    clientFactory = Stop(reactor)
    clientFactory.protocol = CheckConnection
    needsRunningReactor(reactor, (lambda : self.connect(reactor, clientFactory)))
    reactor.run()
    self.assertTrue(connected)
