def test_resumeProducingBuffersOutput(self):
        """
        L{SingleRangeStaticProducer.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'abc' * bufferSize
        producer = static.SingleRangeStaticProducer(
            request, StringIO(content), 1, bufferSize+10)
        # DummyRequest.registerProducer pulls all output from the producer, so
        # we just need to call start.
        producer.start()
        expected = [
            content[1:bufferSize+1],
            content[bufferSize+1:bufferSize+11],
            ]
        self.assertEqual(expected, request.written)

        L{SingleRangeStaticProducer.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