'Non-streaming producers get wrapped as streaming producers.'

def test_nonStreamingProducer(self):

    (clientProtocol, tlsProtocol) = buildTLSProtocol()
    producer = NonStreamingProducer(clientProtocol.transport)
    clientProtocol.transport.registerProducer(producer, False)
    streamingProducer = tlsProtocol.transport.producer._producer
    self.assertIsInstance(streamingProducer, _PullToPush)
    self.assertEqual(streamingProducer._producer, producer)
    self.assertEqual(streamingProducer._consumer, clientProtocol.transport)
    self.assertTrue(tlsProtocol.transport.streaming)
    def done(ignore):
        self.assertIsNone(producer.consumer)
        self.assertIsNone(tlsProtocol.transport.producer)
        self.assertTrue(streamingProducer._finished)
    producer.result.addCallback(done)
    (serverProtocol, serverTLSProtocol) = buildTLSProtocol(server=True)
    self.flushTwoTLSProtocols(tlsProtocol, serverTLSProtocol)
    return producer.result
