'L{HTTPChannel} unregisters itself when it times out a connection.'

def test_HTTPChannelUnregistersSelfWhenTimingOut(self):

    clock = Clock()
    transport = StringTransport()
    channel = http.HTTPChannel()
    channel.timeOut = 100
    channel.callLater = clock.callLater
    channel.makeConnection(transport)
    clock.advance(99)
    self.assertIs(transport.producer, channel)
    self.assertIs(transport.streaming, True)
    clock.advance(1)
    self.assertIs(transport.producer, None)
    self.assertIs(transport.streaming, None)
