def test_invalidRangeRequest(self):
        """
        An incorrect range request (RFC 2616 defines a correct range request as
        a Bytes-Unit followed by a '=' character followed by a specific range.
        Only 'bytes' is defined) results in the range header value being logged
        and a normal 200 response being sent.
        """
        range = b'foobar=0-43'
        self.request.requestHeaders.addRawHeader(b'range', range)
        self.resource.render(self.request)
        expected = "Ignoring malformed Range header %r" % (range.decode(),)
        self._assertLogged(expected)
        self.assertEqual(b''.join(self.request.written), self.payload)
        self.assertEqual(self.request.responseCode, http.OK)
        self.assertEqual(
            self.request.responseHeaders.getRawHeaders(b'content-length')[0],
            intToBytes(len(self.payload)))

        An incorrect range request (RFC 2616 defines a correct range request as
        a Bytes-Unit followed by a '=' character followed by a specific range.
        Only 'bytes' is defined) results in the range header value being logged
        and a normal 200 response being sent.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py