def test_resumeProducingBuffersOutput(self):
        """
        L{NoRangeStaticProducer.start} writes at most
        C{abstract.FileDescriptor.bufferSize} bytes of content from the
        resource to the request at once.
        """
        request = DummyRequest([])
        bufferSize = abstract.FileDescriptor.bufferSize
        content = b'a' * (2*bufferSize + 1)
        producer = static.NoRangeStaticProducer(
            request, StringIO(content))
        # start calls registerProducer on the DummyRequest, which pulls all
        # output from the producer and so we just need this one call.
        producer.start()
        expected = [
            content[0:bufferSize],
            content[bufferSize:2*bufferSize],
            content[2*bufferSize:]
            ]
        self.assertEqual(expected, request.written)

        L{NoRangeStaticProducer.start} writes at most
        C{abstract.FileDescriptor.bufferSize} bytes of content from the
        resource to the request at once.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py