def test_streamingProducerStopProducing(self):
        """
        If the underlying transport tells its producer to stopProducing(),
        this is passed on to the high-level producer.
        """
        _, tlsProtocol, producer = self.setupStreamingProducer()
        tlsProtocol.transport.producer.stopProducing()
        self.assertEqual(producer.producerState, 'stopped')

        If the underlying transport tells its producer to stopProducing(),
        this is passed on to the high-level producer.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/test/test_tls.py