def test_registerProducer(self):
        """
        L{StringTransport.registerProducer} records the arguments supplied to
        it as instance attributes.
        """
        producer = object()
        streaming = object()
        self.transport.registerProducer(producer, streaming)
        self.assertIs(self.transport.producer, producer)
        self.assertIs(self.transport.streaming, streaming)

        L{StringTransport.registerProducer} records the arguments supplied to
        it as instance attributes.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_testing.py