def test_statusMustBeNativeString(self):
        """
        The response status passed to the I{start_response} callable MUST be a
        native string in Python 2 and Python 3.
        """
        status = b"200 OK" if _PY3 else u"200 OK"

        def application(environ, startResponse):
            startResponse(status, [])
            return iter(())

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

        def checkMessage(error):
            if _PY3:
                self.assertEqual(
                    "status must be str, not b'200 OK' (bytes)", str(error))
            else:
                self.assertEqual(
                    "status must be str, not u'200 OK' (unicode)", str(error))

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

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