예제 #1
0
 def test_root(self):
     root = core.root_obj(server=config.server, cred=config.cred)
     obj = core.open_object(root.ADsPath, cred=config.cred)
     self.assertEquals(obj.GUID, root.GUID)
예제 #2
0
 def _test(self):
     root = core.root_obj(server=config.server, cred=config.cred)
     return core.query(root, "name=CN=Domain Admins", attributes=["sAMAccountname"])
예제 #3
0
 def _test(self, *args, **kwargs):
     root_obj = core.root_obj(cred=config.cred, *args, **kwargs)
     self.assertIsInstance(root_obj, com_object)
     self.assertEquals(root_obj.ADsPath, core.root_moniker(*args, **kwargs))
예제 #4
0
 def test_cacheing(self):
     self.assertIs(core.root_obj(cred=config.cred), core.root_obj(cred=config.cred))
예제 #5
0
 def setUp (self):
   with credentials.credentials (config.cred):
     self.root = core.root_obj (server=config.server)
   self._ou = self.root.GetObject ("organizationalUnit", config.test_base)
   self.ou = build_from_data (self._ou, DATA)
   self.addCleanup (self._remove_ou)