Beispiel #1
0
 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))
Beispiel #2
0
 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) == []
Beispiel #3
0
 def test_values(self):
     values = registry.values(TEST_KEY)
     self.assertEqual(next(values), ('winsys1', GUID))
     self.assertEqual(next(values), ('winsys2', GUID))
Beispiel #4
0
 def test_values (self):
   values = registry.values (TEST_KEY)
   assert next (values) == ('winsys1', GUID)
   assert next (values) == ('winsys2', GUID)
Beispiel #5
0
 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))
Beispiel #6
0
 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), [])
Beispiel #7
0
 def test_values(self):
     values = registry.values(TEST_KEY)
     self.assertEqual(next(values),('winsys1', GUID))
     self.assertEqual(next(values),('winsys2', GUID))
Beispiel #8
0
 def test_values (self):
   values = registry.values (TEST_KEY)
   assert next (values) == ('winsys1', GUID)
   assert next (values) == ('winsys2', GUID)
Beispiel #9
0
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) == []
Beispiel #10
0
def test_values_access_denied ():
  key = registry.registry (TEST_KEY, win32con.KEY_ENUMERATE_SUB_KEYS)
  registry.values (key).next ()
Beispiel #11
0
def test_values ():
  values = registry.values (TEST_KEY)
  assert values.next () == ('winsys1', GUID)
  assert values.next () == ('winsys2', GUID)