def test_values_access_denied (self): with self.assertRaises (registry.exc.x_access_denied): key = registry.registry (TEST_KEY, win32con.KEY_ENUMERATE_SUB_KEYS) next (registry.values (key))
def test_values_ignore_access_denied (self): key = registry.registry (TEST_KEY, win32con.KEY_ENUMERATE_SUB_KEYS) values = registry.values (key, ignore_access_errors=True) assert list (values) == []
def test_values(self): values = registry.values(TEST_KEY) self.assertEqual(next(values), ('winsys1', GUID)) self.assertEqual(next(values), ('winsys2', GUID))
def test_values (self): values = registry.values (TEST_KEY) assert next (values) == ('winsys1', GUID) assert next (values) == ('winsys2', GUID)
def test_values_access_denied(self): with self.assertRaises(registry.exc.x_access_denied): key = registry.registry(TEST_KEY, win32con.KEY_ENUMERATE_SUB_KEYS) next(registry.values(key))
def test_values_ignore_access_denied(self): key = registry.registry(TEST_KEY, win32con.KEY_ENUMERATE_SUB_KEYS) values = registry.values(key, ignore_access_errors=True) self.assertEqual(list(values), [])
def test_values(self): values = registry.values(TEST_KEY) self.assertEqual(next(values),('winsys1', GUID)) self.assertEqual(next(values),('winsys2', GUID))
def test_values_ignore_access_denied (): key = registry.registry (TEST_KEY, win32con.KEY_ENUMERATE_SUB_KEYS) values = registry.values (key, ignore_access_errors=True) assert list (values) == []
def test_values_access_denied (): key = registry.registry (TEST_KEY, win32con.KEY_ENUMERATE_SUB_KEYS) registry.values (key).next ()
def test_values (): values = registry.values (TEST_KEY) assert values.next () == ('winsys1', GUID) assert values.next () == ('winsys2', GUID)