def test_serverProtocolIsNativeString(self):
        """
        The C{'SERVER_PROTOCOL'} key of the C{environ} C{dict} passed to the
        application is always a native string.
        """
        for serverProtocol in b"1.1", u"1.1":
            request, result = self.prepareRequest()
            # In Python 3, native strings can be rejected by Request.write()
            # which will cause a crash after the bit we're trying to test, so
            # we patch write() out here to do nothing.
            request.write = lambda data: None
            request.requestReceived(version=b"1.1")
            result.addCallback(self.environKeyEqual('SERVER_PROTOCOL', '1.1'))
            self.assertIsInstance(self.successResultOf(result), str)

        The C{'SERVER_PROTOCOL'} key of the C{environ} C{dict} passed to the
        application is always a native string.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_wsgi.py