def test_read(self):
        """
        Test L{ftp.IReadFile}: the implementation should have a send method
        returning a C{Deferred} which fires when all the data has been sent
        to the consumer, and the data should be correctly send to the consumer.
        """
        content = b'wobble\n'
        consumer = TestConsumer()
        def cbGet(reader):
            return reader.send(consumer).addCallback(cbSend)
        def cbSend(res):
            self.assertEqual(b"".join(consumer.buffer), content)
        return self.getFileReader(content).addCallback(cbGet)

        Test L{ftp.IReadFile}: the implementation should have a send method
        returning a C{Deferred} which fires when all the data has been sent
        to the consumer, and the data should be correctly send to the consumer.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py