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)
def _test(self): root = core.root_obj(server=config.server, cred=config.cred) return core.query(root, "name=CN=Domain Admins", attributes=["sAMAccountname"])
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))
def test_cacheing(self): self.assertIs(core.root_obj(cred=config.cred), core.root_obj(cred=config.cred))
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)