def test_setResponseCodeAndMessageNotBytes(self):
        """
        L{http.Request.setResponseCode} accepts C{bytes} for the message
        parameter and raises L{TypeError} if passed anything else.
        """
        channel = DummyChannel()
        req = http.Request(channel, False)
        self.assertRaises(TypeError, req.setResponseCode,
                          202, u"not happily accepted")

        L{http.Request.setResponseCode} accepts C{bytes} for the message
        parameter and raises L{TypeError} if passed anything else.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py