def test_HTTPChannelStopWithNoRequestOutstanding(self):
        """
        If there is no request producer currently registered, C{stopProducing}
        does nothing.
        """
        channel, transport = self.buildChannelAndTransport(
            StringTransport(), DummyHTTPHandler
        )

        channel.unregisterProducer()
        self.assertIs(channel._requestProducer, None)

        If there is no request producer currently registered, C{stopProducing}
        does nothing.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py