def getPort(port):
    
    portStr = ""
    if port:
        if str(port).strip() == "#":
            portStr = ""
        else:
            portStr = ":" + str(port)
    
    return portStr
Returns a mocked instance of ConfigWriter
dataset/ETHPy150Open Esri/ops-server-config/SupportFiles/AGSRestFunctions.py/getPort--crossover with--dataset/ETHPy150Open ganeti/ganeti/test/py/ganeti.config_unittest.py/TestConfigRunner._get_object_mock