def test_headerValueMustBeNativeString(self):
        """
        Each header value passed to the I{start_response} callable MUST be at
        native string in Python 2 and Python 3.
        """
        value = b"value" if _PY3 else u"value"

        def application(environ, startResponse):
            startResponse("200 OK", [("key", value)])
            return iter(())

        request, result = self.prepareRequest(application)
        request.requestReceived()

        def checkMessage(error):
            self.assertEqual(
                "header must be (str, str) tuple, not ('key', %r)" % (value,),
                str(error))

        return self.assertFailure(result, TypeError).addCallback(checkMessage)

        Each header value passed to the I{start_response} callable MUST be at
        native string in Python 2 and Python 3.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_wsgi.py