'The C{\'SERVER_NAME\'} key of the C{environ} C{dict} passed to the
application contains the best determination of the server hostname
possible, using either the value of the I{Host} header in the request
or the address the server is listening on if that header is not
present (RFC 3875, section 4.1.14).'

def test_serverName(self):

    missing = self.render('GET', '1.1', [], [''])
    missing.addCallback(self.environKeyEqual('SERVER_NAME', '10.0.0.1'))
    present = self.render('GET', '1.1', [], [''], None, [('host', 'example.org')])
    present.addCallback(self.environKeyEqual('SERVER_NAME', 'example.org'))
    return gatherResults([missing, present])
