def test_chainedPausedDeferredWithResult(self):
        """
        When a paused Deferred with a result is returned from a callback on
        another Deferred, the other Deferred is chained to the first and waits
        for it to be unpaused.
        """
        expected = object()
        paused = defer.Deferred()
        paused.callback(expected)
        paused.pause()
        chained = defer.Deferred()
        chained.addCallback(lambda ignored: paused)
        chained.callback(None)

        result = []
        chained.addCallback(result.append)
        self.assertEqual(result, [])
        paused.unpause()
        self.assertEqual(result, [expected])

        When a paused Deferred with a result is returned from a callback on
        another Deferred, the other Deferred is chained to the first and waits
        for it to be unpaused.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_defer.py