def test_setHeader(self):
        """
        L{http.Request.setHeader} sets the value of the given response header.
        """
        req = http.Request(DummyChannel(), False)
        req.setHeader(b"test", b"lemur")
        self.assertEqual(req.responseHeaders.getRawHeaders(b"test"), [b"lemur"])

        L{http.Request.setHeader} sets the value of the given response header.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py