def test_specifiedPort(self):
        """
        L{SSHCommandClientEndpoint} uses the C{port} argument if specified.
        """
        endpoint = SSHCommandClientEndpoint.newConnection(
            self.reactor, b"dummy command", b"dummy user",
            self.hostname, port=2222)
        self.assertEqual(2222, endpoint._creator.port)

        L{SSHCommandClientEndpoint} uses the C{port} argument if specified.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_endpoints.py