def test_explicitRange(self):
        """
        A correct response to a bytes range header request from A to B starts
        with the A'th byte and ends with (including) the B'th byte. The first
        byte of a page is numbered with 0.
        """
        self.request.requestHeaders.addRawHeader(b'range', b'bytes=3-43')
        self.resource.render(self.request)
        written = b''.join(self.request.written)
        self.assertEqual(written, self.payload[3:44])
        self.assertEqual(self.request.responseCode, http.PARTIAL_CONTENT)
        self.assertEqual(
            self.request.responseHeaders.getRawHeaders(b'content-range')[0],
            b'bytes 3-43/64')
        self.assertEqual(
            intToBytes(len(written)),
            self.request.responseHeaders.getRawHeaders(b'content-length')[0])

        A correct response to a bytes range header request from A to B starts
        with the A'th byte and ends with (including) the B'th byte. The first
        byte of a page is numbered with 0.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py