def test_custom_admin_share(): initialize_pdh_tests() instance = copy.deepcopy(DEFAULT_INSTANCE) instance['admin_share'] = 'ipc$' c = PDHBaseCheck("testcheck", {}, {}, [instance], SINGLE_INSTANCE_COUNTER) nr = c._get_netresource('1.2.3.4') assert nr.lpRemoteName == '\\\\1.2.3.4\\ipc$'
def test_default_admin_share(): initialize_pdh_tests() c = PDHBaseCheck("testcheck", {}, [DEFAULT_INSTANCE], SINGLE_INSTANCE_COUNTER) nr = c._get_netresource('1.1.1.1') assert nr.lpRemoteName == '\\\\1.1.1.1\\c$' assert nr.dwType == 0 assert nr.lpLocalName is None