'When a non-zero timeout is passed to L{getPage} and that many
seconds elapse before the server responds to the request. the
L{Deferred} is errbacked with a L{error.TimeoutError}.'

def test_timeoutTriggering(self):

    finished = self.assertFailure(getPage(self.getURL('wait'), timeout=1e-06), defer.TimeoutError)
    def cleanup(passthrough):
        connected = list(six.iterkeys(self.wrapper.protocols))
        if connected:
            connected[0].transport.loseConnection()
        return passthrough
    finished.addBoth(cleanup)
    return finished
