'The C{\'SERVER_NAME\'} key of the C{environ} C{dict} passed to the
application is always a native string.'

def test_serverNameIsNativeString(self):

    for serverName in ('host.example.com', u'host.example.com'):
        (request, result) = self.prepareRequest()
        request.getRequestHostname = (lambda : serverName)
        request.requestReceived()
        result.addCallback(self.environKeyEqual('SERVER_NAME', 'host.example.com'))
        self.assertIsInstance(self.successResultOf(result), str)
