'The C{\'SERVER_PORT\'} key of the C{environ} C{dict} passed to the
application contains the port number of the server which received the
request (RFC 3875, section 4.1.15).'

def test_serverPort(self):

    portNumber = 12354
    def makeChannel():
        channel = DummyChannel()
        channel.transport = DummyChannel.TCP()
        channel.transport.port = portNumber
        return channel
    self.channelFactory = makeChannel
    d = self.render('GET', '1.1', [], [''])
    d.addCallback(self.environKeyEqual('SERVER_PORT', str(portNumber)))
    return d
