def testTriggerResume(self):
        """Make sure I resumeProducing when my buffer empties."""
        self.proxy.pauseProducing()
        self.proxy.write("x" * 102)
        self.assertTrue(self.parentProducer.paused, "should be paused")
        self.proxy.resumeProducing()
        # Resuming should have emptied my buffer, so I should tell my
        # parent to resume too.
        self.assertFalse(self.parentProducer.paused,
                    "Producer should have resumed.")
        self.assertFalse(self.proxy.producerPaused)
Make sure I resumeProducing when my buffer empties.
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_pcp.py