'If C{callLater} is patched onto the L{http._GenericHTTPChannelProtocol}
then we need to propagate it across onto a new backing channel after
upgrade.'

def test_genericHTTPChannelCallLaterUpgrade(self):

    clock = Clock()
    factory = http.HTTPFactory(reactor=clock)
    protocol = factory.buildProtocol(None)
    self.assertEqual(protocol.callLater, clock.callLater)
    self.assertEqual(protocol._channel.callLater, clock.callLater)
    transport = StringTransport()
    transport.negotiatedProtocol = 'h2'
    protocol.requestFactory = DummyHTTPHandler
    protocol.makeConnection(transport)
    protocol.dataReceived('P')
    self.assertEqual(protocol.callLater, clock.callLater)
    self.assertEqual(protocol._channel.callLater, clock.callLater)
