def __init__(self, result=None, error=None, reqId=None): self.result = unprotect_passwords(result) self.error = error self.id = reqId
def devicesGetList(self, storageType=None, guids=(), checkStatus=True, options=None): api = API.Global() res = api.getDeviceList(storageType, guids, checkStatus) return unprotect_passwords(res)
def test_unprotect_dict(self): protected = dict_protected() unprotected = dict_unprotedted() self.assertEqual(unprotected, unprotect_passwords(protected))
def test_unprotect_nested_dicts(self): protected = nested_dicts_protected() unprotected = nested_dicts_unprotected() self.assertEqual(unprotected, unprotect_passwords(protected))
def test_unprotect_lists_of_dicts(self): protected = lists_of_dicts_protected() unprotected = lists_of_dicts_unprotected() self.assertEqual(unprotected, unprotect_passwords(protected))
def test_unprotect_empty(self, result): self.assertEqual(result, unprotect_passwords(result))
def devicesGetList(self, storageType=None, options=None): api = API.Global() res = api.getDeviceList(storageType) return unprotect_passwords(res)