pydsdb: Import testtools before subunit for those that don't have
authorJelmer Vernooij <jelmer@samba.org>
Wed, 3 Nov 2010 16:53:19 +0000 (17:53 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 3 Nov 2010 17:47:54 +0000 (17:47 +0000)
testtools installed.

Also, cleanup some imports.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Nov  3 17:47:55 UTC 2010 on sn-devel-104

source4/dsdb/tests/python/acl.py
source4/dsdb/tests/python/deletetest.py
source4/dsdb/tests/python/dsdb_schema_info.py
source4/dsdb/tests/python/ldap.py
source4/dsdb/tests/python/ldap_schema.py
source4/dsdb/tests/python/passwords.py
source4/dsdb/tests/python/sam.py
source4/dsdb/tests/python/sec_descriptor.py
source4/dsdb/tests/python/urgent_replication.py

index d4c55a44acf9f6744beb0eae45e572cd6143dece..5d6ce25248cfb2a18a6bcba8a6d9d593908e5007 100755 (executable)
@@ -9,8 +9,8 @@ import re
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
index 59ebf99c70a6a380a462ee0ced37932a55cd5af5..8ed5281a4c1aab06e1849fe540138e4e6398e350 100755 (executable)
@@ -7,8 +7,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
index 9c4f7b1c43a942ff79e714bfc617869ceaec18db..dc82fe071cbb9a1ac81417298809787689e9df0d 100755 (executable)
 import sys
 import time
 import random
-import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
 
-from samba.auth import system_session
 from ldb import SCOPE_BASE, LdbError
-from samba.samdb import SamDB
 
 import samba.tests
 import samba.dcerpc.drsuapi
index 36c12a293087439f771ae21045af848d42f59abd..7057fb4e1e9f74e285b4e20fce14356753b27644 100755 (executable)
@@ -10,8 +10,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
@@ -23,19 +23,15 @@ from ldb import ERR_NOT_ALLOWED_ON_NON_LEAF, ERR_OTHER, ERR_INVALID_DN_SYNTAX
 from ldb import ERR_NO_SUCH_ATTRIBUTE, ERR_INVALID_ATTRIBUTE_SYNTAX
 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 Message, MessageElement, Dn
 from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE
 from samba import Ldb
-from samba.dsdb import (UF_NORMAL_ACCOUNT, UF_INTERDOMAIN_TRUST_ACCOUNT,
-    UF_WORKSTATION_TRUST_ACCOUNT, UF_SERVER_TRUST_ACCOUNT,
-    UF_PARTIAL_SECRETS_ACCOUNT,
+from samba.dsdb import (UF_NORMAL_ACCOUNT,
+    UF_WORKSTATION_TRUST_ACCOUNT,
     UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE, ATYPE_NORMAL_ACCOUNT,
     ATYPE_WORKSTATION_TRUST, SYSTEM_FLAG_DOMAIN_DISALLOW_MOVE,
     SYSTEM_FLAG_CONFIG_ALLOW_RENAME, SYSTEM_FLAG_CONFIG_ALLOW_MOVE,
     SYSTEM_FLAG_CONFIG_ALLOW_LIMITED_MOVE)
-from samba.dcerpc.security import (DOMAIN_RID_USERS, DOMAIN_RID_DOMAIN_MEMBERS,
-    DOMAIN_RID_DCS, DOMAIN_RID_READONLY_DCS)
 
 from subunit.run import SubunitTestRunner
 import unittest
index 171d6d1ec4e6ea29d428461dd9b6da9303610c6f..f99a8405cf596b05f5901e96a1196cb49f2d9438 100755 (executable)
@@ -10,8 +10,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
index 314d71b00f0a40308e52afaae989b02667c5f2f6..8f58890d18b17c55c2c7f9f1c6d0498ea499c1f1 100755 (executable)
@@ -15,8 +15,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
index 6d5b1a2d6a7e28458cc2b562cb5f89b31500f788..039ddf1e1ccdbcd5861ffd2e1dfd9f3bffe649ed 100755 (executable)
@@ -4,33 +4,30 @@
 
 import optparse
 import sys
-import time
-import base64
 import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/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 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
-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, ERR_INSUFFICIENT_ACCESS_RIGHTS
+from ldb import ERR_OTHER
+from ldb import ERR_OBJECT_CLASS_VIOLATION
+from ldb import ERR_CONSTRAINT_VIOLATION
+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.dsdb import (UF_NORMAL_ACCOUNT, UF_INTERDOMAIN_TRUST_ACCOUNT,
+from samba.dsdb import (UF_NORMAL_ACCOUNT,
     UF_WORKSTATION_TRUST_ACCOUNT, UF_SERVER_TRUST_ACCOUNT,
     UF_PARTIAL_SECRETS_ACCOUNT, UF_TEMP_DUPLICATE_ACCOUNT,
-    UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE, ATYPE_NORMAL_ACCOUNT,
+    UF_PASSWD_NOTREQD, ATYPE_NORMAL_ACCOUNT,
     GTYPE_SECURITY_BUILTIN_LOCAL_GROUP, GTYPE_SECURITY_DOMAIN_LOCAL_GROUP,
     GTYPE_SECURITY_GLOBAL_GROUP, GTYPE_SECURITY_UNIVERSAL_GROUP,
     GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP, GTYPE_DISTRIBUTION_GLOBAL_GROUP,
@@ -38,16 +35,14 @@ from samba.dsdb import (UF_NORMAL_ACCOUNT, UF_INTERDOMAIN_TRUST_ACCOUNT,
     ATYPE_SECURITY_GLOBAL_GROUP, ATYPE_SECURITY_UNIVERSAL_GROUP,
     ATYPE_SECURITY_LOCAL_GROUP, ATYPE_DISTRIBUTION_GLOBAL_GROUP,
     ATYPE_DISTRIBUTION_UNIVERSAL_GROUP, ATYPE_DISTRIBUTION_LOCAL_GROUP,
-    ATYPE_WORKSTATION_TRUST, SYSTEM_FLAG_DOMAIN_DISALLOW_MOVE,
-    SYSTEM_FLAG_CONFIG_ALLOW_RENAME, SYSTEM_FLAG_CONFIG_ALLOW_MOVE,
-    SYSTEM_FLAG_CONFIG_ALLOW_LIMITED_MOVE)
+    ATYPE_WORKSTATION_TRUST)
 from samba.dcerpc.security import (DOMAIN_RID_USERS, DOMAIN_RID_DOMAIN_MEMBERS,
     DOMAIN_RID_DCS, DOMAIN_RID_READONLY_DCS)
 
 from subunit.run import SubunitTestRunner
 import unittest
 
-from samba.ndr import ndr_pack, ndr_unpack
+from samba.ndr import ndr_unpack
 from samba.dcerpc import security
 
 parser = optparse.OptionParser("sam.py [options] <host>")
index 6748883474c77cf54d16918f03b43261474db0ae..55a67dde82c1b68403be827332ca0ff63e10b184 100755 (executable)
@@ -10,8 +10,8 @@ import random
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
index 47d43dd397e5278a13e7a9dc989bbffef1f7e587..af5cacaaa8154932373bf23f25b52410cd1d80b8 100755 (executable)
@@ -7,8 +7,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options