def test_portArgumentIsRespected(self):
        """
        If a port is passed, the endpoint respects it.
        """
        expectedPort = 4321
        endpoint = self.makeEndpoint(port=expectedPort)
        self.assertEqual(endpoint._wrappedEndpoint._port, expectedPort)

        If a port is passed, the endpoint respects it.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_agent.py