diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-04-04 00:14:23 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-04-04 00:14:23 +0200 |
commit | 31a517e1721fc0080473b376cd59c090cfab6456 (patch) | |
tree | 8e75013e726e9906a62d208c62624ae9927bb550 /source4/lib/ldb | |
parent | e5b33be2f2655ae8b3a59bf7fe54174464c8cbe9 (diff) | |
download | samba-31a517e1721fc0080473b376cd59c090cfab6456.tar.gz samba-31a517e1721fc0080473b376cd59c090cfab6456.tar.bz2 samba-31a517e1721fc0080473b376cd59c090cfab6456.zip |
s4-python: Move dsdb constants to a separate python module.
Diffstat (limited to 'source4/lib/ldb')
-rwxr-xr-x | source4/lib/ldb/tests/python/ldap.py | 7 | ||||
-rwxr-xr-x | source4/lib/ldb/tests/python/ldap_schema.py | 37 | ||||
-rwxr-xr-x | source4/lib/ldb/tests/python/sec_descriptor.py | 6 |
3 files changed, 12 insertions, 38 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py index 4f35ead2de..aa1febd285 100755 --- a/source4/lib/ldb/tests/python/ldap.py +++ b/source4/lib/ldb/tests/python/ldap.py @@ -24,10 +24,9 @@ from ldb import ERR_UNDEFINED_ATTRIBUTE_TYPE from ldb import Message, MessageElement, Dn from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE from samba import Ldb -from samba import UF_NORMAL_ACCOUNT -from samba import UF_WORKSTATION_TRUST_ACCOUNT -from samba import UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE -from samba import ATYPE_NORMAL_ACCOUNT, ATYPE_WORKSTATION_TRUST +from samba.dsdb import (UF_NORMAL_ACCOUNT, UF_WORKSTATION_TRUST_ACCOUNT, + UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE, ATYPE_NORMAL_ACCOUNT, + ATYPE_WORKSTATION_TRUST) from subunit.run import SubunitTestRunner import unittest diff --git a/source4/lib/ldb/tests/python/ldap_schema.py b/source4/lib/ldb/tests/python/ldap_schema.py index 4ed1d1c3b4..932ef467fc 100755 --- a/source4/lib/ldb/tests/python/ldap_schema.py +++ b/source4/lib/ldb/tests/python/ldap_schema.py @@ -2,12 +2,10 @@ # -*- coding: utf-8 -*- # This is a port of the original in testprogs/ejs/ldap.js -import getopt import optparse import sys import time import random -import base64 import os sys.path.append("bin/python") @@ -15,41 +13,18 @@ sys.path.append("bin/python") import samba.getopt as options from samba.auth import system_session -from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError -from ldb import ERR_NO_SUCH_OBJECT, ERR_ATTRIBUTE_OR_VALUE_EXISTS -from ldb import ERR_ENTRY_ALREADY_EXISTS, ERR_UNWILLING_TO_PERFORM -from ldb import ERR_NOT_ALLOWED_ON_NON_LEAF, ERR_OTHER, ERR_INVALID_DN_SYNTAX -from ldb import ERR_NO_SUCH_ATTRIBUTE, ERR_INSUFFICIENT_ACCESS_RIGHTS -from ldb import ERR_OBJECT_CLASS_VIOLATION, ERR_NOT_ALLOWED_ON_RDN -from ldb import ERR_NAMING_VIOLATION, ERR_CONSTRAINT_VIOLATION -from ldb import ERR_UNDEFINED_ATTRIBUTE_TYPE +from ldb import SCOPE_ONELEVEL, SCOPE_BASE, LdbError +from ldb import ERR_NO_SUCH_OBJECT +from ldb import ERR_UNWILLING_TO_PERFORM +from ldb import ERR_CONSTRAINT_VIOLATION from ldb import Message, MessageElement, Dn -from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE +from ldb import FLAG_MOD_REPLACE from samba import Ldb -from samba import UF_NORMAL_ACCOUNT, UF_TEMP_DUPLICATE_ACCOUNT -from samba import UF_SERVER_TRUST_ACCOUNT, UF_WORKSTATION_TRUST_ACCOUNT -from samba import UF_INTERDOMAIN_TRUST_ACCOUNT -from samba import UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE -from samba import GTYPE_SECURITY_BUILTIN_LOCAL_GROUP -from samba import GTYPE_SECURITY_GLOBAL_GROUP, GTYPE_SECURITY_DOMAIN_LOCAL_GROUP -from samba import GTYPE_SECURITY_UNIVERSAL_GROUP -from samba import GTYPE_DISTRIBUTION_GLOBAL_GROUP -from samba import GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP -from samba import GTYPE_DISTRIBUTION_UNIVERSAL_GROUP -from samba import ATYPE_NORMAL_ACCOUNT, ATYPE_WORKSTATION_TRUST -from samba import ATYPE_SECURITY_GLOBAL_GROUP, ATYPE_SECURITY_LOCAL_GROUP -from samba import ATYPE_SECURITY_UNIVERSAL_GROUP -from samba import ATYPE_DISTRIBUTION_GLOBAL_GROUP -from samba import ATYPE_DISTRIBUTION_LOCAL_GROUP -from samba import ATYPE_DISTRIBUTION_UNIVERSAL_GROUP -from samba import DS_DC_FUNCTION_2003 +from samba.dsdb import DS_DC_FUNCTION_2003 from subunit.run import SubunitTestRunner import unittest -from samba.ndr import ndr_pack, ndr_unpack -from samba.dcerpc import security - parser = optparse.OptionParser("ldap [options] <host>") sambaopts = options.SambaOptions(parser) parser.add_option_group(sambaopts) diff --git a/source4/lib/ldb/tests/python/sec_descriptor.py b/source4/lib/ldb/tests/python/sec_descriptor.py index 8b2a87992f..30f82e6a87 100755 --- a/source4/lib/ldb/tests/python/sec_descriptor.py +++ b/source4/lib/ldb/tests/python/sec_descriptor.py @@ -13,15 +13,15 @@ sys.path.append("bin/python") import samba.getopt as options # Some error messages that are being tested -from ldb import SCOPE_SUBTREE, SCOPE_BASE, LdbError -from ldb import ERR_NO_SUCH_OBJECT +from ldb import SCOPE_SUBTREE, SCOPE_BASE, LdbError, ERR_NO_SUCH_OBJECT # For running the test unit from samba.ndr import ndr_pack, ndr_unpack from samba.dcerpc import security +from samba import Ldb from samba.auth import system_session -from samba import Ldb, DS_DOMAIN_FUNCTION_2008 +from samba.dsdb import DS_DOMAIN_FUNCTION_2008 from samba.dcerpc.security import ( SECINFO_OWNER, SECINFO_GROUP, SECINFO_DACL, SECINFO_SACL) from subunit.run import SubunitTestRunner |