[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Wed Nov 19 12:51:02 MST 2014


The branch, master has been updated
       via  71a9e5d filter-subunit: Consistently use spaces rather than tabs.
       via  4944554 Support using system ldbmodify.
       via  fb08cd5 Fix subunit test suite name.
       via  1800bc5 dsdb.tests.acl: Create and run a single testsuite, should easy migration to regulary Python unit tests.
       via  d817791 dsdb.tests.ldap: Create and run a single testsuite, should easy migration to regulary Python unit tests.
       via  5757c50 speedtest: Create and run a single testsuite, should easy migration to regulary Python unit tests.
       via  7f0969d dirsync test: Create and run a single testsuite, should easy migration to regulary Python unit tests.
       via  a214bf6 Add 'make randomized-test' rule.
       via  1ef2f39 Remove tabs in python file, unnecessary 'pass'.
      from  082f887 pidl: White space cleanups in Conformance.pm and NDR.pm

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 71a9e5da2be8feae2f7cbb248b7c091f435d964e
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Oct 26 11:31:38 2014 -0700

    filter-subunit: Consistently use spaces rather than tabs.
    
    Change-Id: I760399cb4bf0aa9753f5f1e842919b386e1caca9
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Jelmer Vernooij <jelmer at samba.org>
    Autobuild-Date(master): Wed Nov 19 20:50:29 CET 2014 on sn-devel-104

commit 49445541e750328fc9b766593eddc61a65f97ccb
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 1 10:17:23 2014 -0700

    Support using system ldbmodify.
    
    Fixes this test when bin/ldbmodify isn't built because we're using the
    system ldbmodify.
    
    Change-Id: I2ff0d9808245353006c6be4989976a3edad8f98e
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit fb08cd5310c2c806e49597da4c3a310b058645ae
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 1 15:57:35 2014 -0700

    Fix subunit test suite name.
    
    Only run it when testscenarios is installed, as it depends on that.
    
    Change-Id: I1e1284024cf94f909e585a55b8a15e33273f167b
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 1800bc567d56d0c193410a83692185ebbbce7f43
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 1 20:06:52 2014 -0700

    dsdb.tests.acl: Create and run a single testsuite, should easy migration to regulary Python unit tests.
    
    Change-Id: I89072d3af1d90e87a47c197d28943f47cedc5deb
    Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit d8177912be179dc4342118827ce439048df43ef9
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 1 20:07:02 2014 -0700

    dsdb.tests.ldap: Create and run a single testsuite, should easy migration to regulary Python unit tests.
    
    Change-Id: I07216ff1063e127b541bf4e5d6349d5a75cec678
    Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 5757c5071e3cf5f207bc9772beffe5c2a7eb22f3
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 1 20:09:12 2014 -0700

    speedtest: Create and run a single testsuite, should easy migration to regulary Python unit tests.
    
    Change-Id: Ib31eb26b8f6094a51cd4985b9ae98d018ae95c2d
    Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 7f0969d79a45c7ae4c62a319889680bf3117b71c
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 1 20:27:30 2014 -0700

    dirsync test: Create and run a single testsuite, should easy migration to regulary Python unit tests.
    
    Change-Id: I6fbffd6453f8af966938943f2895bd6d93f8fb59
    Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit a214bf6fb1a43be98e2a3354a4785053996e4ee0
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Nov 16 15:44:33 2014 +0000

    Add 'make randomized-test' rule.
    
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>

commit 1ef2f39c95ca3ceb45a88343e1375f10c3dfdc29
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Nov 16 14:43:29 2014 +0000

    Remove tabs in python file, unnecessary 'pass'.
    
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 Makefile                               |   3 +
 nsswitch/tests/test_rfc2307_mapping.sh |   7 +-
 selftest/filter-subunit                |  72 ++++++-------
 selftest/tests.py                      |   7 +-
 source4/dsdb/tests/python/acl.py       |  77 ++++++++------
 source4/dsdb/tests/python/dirsync.py   |  27 +++--
 source4/dsdb/tests/python/ldap.py      | 189 +++++++++++++--------------------
 source4/scripting/devel/speedtest.py   |  16 +--
 wscript                                |   3 +-
 9 files changed, 188 insertions(+), 213 deletions(-)


Changeset truncated at 500 lines:

diff --git a/Makefile b/Makefile
index 60d87ae..aa532b6 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,9 @@ gdbtestenv:
 quicktest:
 	$(WAF) test --quick $(TEST_OPTIONS)
 
+randomized-test:
+	$(WAF) test --random-order $(TEST_OPTIONS)
+
 dist:
 	touch .tmplock
 	WAFLOCK=.tmplock $(WAF) dist
diff --git a/nsswitch/tests/test_rfc2307_mapping.sh b/nsswitch/tests/test_rfc2307_mapping.sh
index f1e3ea9..4fd93a4 100755
--- a/nsswitch/tests/test_rfc2307_mapping.sh
+++ b/nsswitch/tests/test_rfc2307_mapping.sh
@@ -19,7 +19,12 @@ failed=0
 samba4bindir="$BINDIR"
 wbinfo="$VALGRIND $samba4bindir/wbinfo"
 samba_tool="$VALGRIND $samba4bindir/samba-tool"
-ldbmodify="$samba4bindir/ldbmodify"
+if [ -f "$samba4bindir/ldbmodify" ]; then
+	ldbmodify="$samba4bindir/ldbmodify"
+else
+	# Using system ldbmodify
+	ldbmodify="ldbmodify"
+fi
 
 . `dirname $0`/../../testprogs/blackbox/subunit.sh
 
diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index 2ed1430..5b74343 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -29,73 +29,73 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
 import subunithelper
 
 parser = optparse.OptionParser("filter-subunit [options] < instream > outstream")
-parser.add_option("--expected-failures", type="string", 
-	help="File containing list of regexes matching tests to consider known "
-	     "failures")
+parser.add_option("--expected-failures", type="string",
+    help="File containing list of regexes matching tests to consider known "
+         "failures")
 parser.add_option("--flapping", type="string",
-	help="File containing list of flapping tests, of which to ignore results.")
+    help="File containing list of flapping tests, of which to ignore results.")
 parser.add_option("--strip-passed-output", action="store_true",
     help="Whether to strip output from tests that passed")
 parser.add_option("--fail-immediately", action="store_true",
     help="Whether to stop on the first error", default=False)
 parser.add_option("--prefix", type="string",
-	help="Add prefix to all test names")
+    help="Add prefix to all test names")
 parser.add_option("--suffix", type="string",
-	help="Add suffix to all test names")
+    help="Add suffix to all test names")
 parser.add_option("--fail-on-empty", default=False,
-	action="store_true", help="Fail if there was no subunit output")
+    action="store_true", help="Fail if there was no subunit output")
 parser.add_option("--list", default=False,
-	action="store_true", help="Operate in list mode")
+    action="store_true", help="Operate in list mode")
 opts, args = parser.parse_args()
 
 if opts.list:
-	prefix = opts.prefix
-	suffix = opts.suffix
-	if not prefix:
-		prefix = ""
-	if not suffix:
-		suffix = ""
-	for l in sys.stdin:
-		sys.stdout.write("%s%s%s\n" % (prefix, l.rstrip(), suffix))
-	sys.exit(0)
+    prefix = opts.prefix
+    suffix = opts.suffix
+    if not prefix:
+        prefix = ""
+    if not suffix:
+        suffix = ""
+    for l in sys.stdin:
+         sys.stdout.write("%s%s%s\n" % (prefix, l.rstrip(), suffix))
+    sys.exit(0)
 
 if opts.expected_failures:
-	expected_failures = subunithelper.read_test_regexes(opts.expected_failures)
+    expected_failures = subunithelper.read_test_regexes(opts.expected_failures)
 else:
-	expected_failures = {}
+    expected_failures = {}
 
 
 if opts.flapping:
-	flapping = subunithelper.read_test_regexes(opts.flapping)
+    flapping = subunithelper.read_test_regexes(opts.flapping)
 else:
-	flapping = {}
+    flapping = {}
 
 statistics = {
-	'TESTS_UNEXPECTED_OK': 0,
-	'TESTS_EXPECTED_OK': 0,
-	'TESTS_UNEXPECTED_FAIL': 0,
-	'TESTS_EXPECTED_FAIL': 0,
-	'TESTS_ERROR': 0,
-	'TESTS_SKIP': 0,
+    'TESTS_UNEXPECTED_OK': 0,
+    'TESTS_EXPECTED_OK': 0,
+    'TESTS_UNEXPECTED_FAIL': 0,
+    'TESTS_EXPECTED_FAIL': 0,
+    'TESTS_ERROR': 0,
+    'TESTS_SKIP': 0,
 }
 
 def handle_sigint(sig, stack):
-	sys.exit(0)
+    sys.exit(0)
 signal.signal(signal.SIGINT, handle_sigint)
 
 out = subunithelper.SubunitOps(sys.stdout)
 msg_ops = subunithelper.FilterOps(out, opts.prefix, opts.suffix, expected_failures,
-				  opts.strip_passed_output,
-				  fail_immediately=opts.fail_immediately,
-				  flapping=flapping)
+    opts.strip_passed_output,
+    fail_immediately=opts.fail_immediately,
+    flapping=flapping)
 
 try:
-	ret = subunithelper.parse_results(msg_ops, statistics, sys.stdin)
+    ret = subunithelper.parse_results(msg_ops, statistics, sys.stdin)
 except subunithelper.ImmediateFail:
-	sys.stdout.flush()
-	sys.exit(1)
+    sys.stdout.flush()
+    sys.exit(1)
 
 if opts.fail_on_empty and not msg_ops.seen_output:
-	sys.exit(1)
+    sys.exit(1)
 else:
-	sys.exit(ret)
+    sys.exit(ret)
diff --git a/selftest/tests.py b/selftest/tests.py
index e83b236..4cd44e3 100644
--- a/selftest/tests.py
+++ b/selftest/tests.py
@@ -37,7 +37,12 @@ if have_man_pages_support:
     planpythontestsuite("none", "samba.tests.docs")
 
 planpythontestsuite("none", "selftest.tests.test_suite", extra_path=[srcdir()])
-planpythontestsuite("none", "subunit")
+try:
+    import testscenarios
+except ImportError:
+    skiptestsuite("subunit", "testscenarios not available")
+else:
+    planpythontestsuite("none", "subunit.tests.test_suite")
 planpythontestsuite("none", "samba.tests.blackbox.ndrdump")
 planpythontestsuite("none", "api", name="ldb.python", extra_path=['lib/ldb/tests/python'])
 planpythontestsuite("none", "samba.tests.credentials")
diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py
index a8c3b12..7ef9ad9 100755
--- a/source4/dsdb/tests/python/acl.py
+++ b/source4/dsdb/tests/python/acl.py
@@ -67,12 +67,12 @@ class AclTests(samba.tests.TestCase):
 
     def setUp(self):
         super(AclTests, self).setUp()
-        self.ldb_admin = ldb
-        self.base_dn = ldb.domain_dn()
-        self.domain_sid = security.dom_sid(ldb.get_domain_sid())
+        self.ldb_admin = SamDB(ldaphost, credentials=creds, session_info=system_session(lp), lp=lp)
+        self.base_dn = self.ldb_admin.domain_dn()
+        self.domain_sid = security.dom_sid(self.ldb_admin.get_domain_sid())
         self.user_pass = "samba123@"
         self.configuration_dn = self.ldb_admin.get_config_basedn().get_linearized()
-        self.sd_utils = sd_utils.SDUtils(ldb)
+        self.sd_utils = sd_utils.SDUtils(self.ldb_admin)
         #used for anonymous login
         self.creds_tmp = Credentials()
         self.creds_tmp.set_username("")
@@ -620,6 +620,19 @@ class AclSearchTests(AclTests):
 
     def setUp(self):
         super(AclSearchTests, self).setUp()
+        # Get the old "dSHeuristics" if it was set
+        dsheuristics = self.ldb_admin.get_dsheuristics()
+        # Reset the "dSHeuristics" as they were before
+        self.addCleanup(self.ldb_admin.set_dsheuristics, dsheuristics)
+        # Set the "dSHeuristics" to activate the correct "userPassword" behaviour
+        self.ldb_admin.set_dsheuristics("000000001")
+        # Get the old "minPwdAge"
+        minPwdAge = self.ldb_admin.get_minPwdAge()
+        # Reset the "minPwdAge" as it was before
+        self.addCleanup(self.ldb_admin.set_minPwdAge, minPwdAge)
+        # Set it temporarely to "0"
+        self.ldb_admin.set_minPwdAge("0")
+
         self.u1 = "search_u1"
         self.u2 = "search_u2"
         self.u3 = "search_u3"
@@ -1281,6 +1294,20 @@ class AclCARTests(AclTests):
 
     def setUp(self):
         super(AclCARTests, self).setUp()
+
+        # Get the old "dSHeuristics" if it was set
+        dsheuristics = self.ldb_admin.get_dsheuristics()
+        # Reset the "dSHeuristics" as they were before
+        self.addCleanup(self.ldb_admin.set_dsheuristics, dsheuristics)
+        # Set the "dSHeuristics" to activate the correct "userPassword" behaviour
+        self.ldb_admin.set_dsheuristics("000000001")
+        # Get the old "minPwdAge"
+        minPwdAge = self.ldb_admin.get_minPwdAge()
+        # Reset the "minPwdAge" as it was before
+        self.addCleanup(self.ldb_admin.set_minPwdAge, minPwdAge)
+        # Set it temporarely to "0"
+        self.ldb_admin.set_minPwdAge("0")
+
         self.user_with_wp = "acl_car_user1"
         self.user_with_pc = "acl_car_user2"
         self.ldb_admin.newuser(self.user_with_wp, self.user_pass)
@@ -1876,35 +1903,17 @@ class AclSPNTests(AclTests):
 ldb = SamDB(ldaphost, credentials=creds, session_info=system_session(lp), lp=lp)
 
 runner = SubunitTestRunner()
-rc = 0
-if not runner.run(unittest.makeSuite(AclAddTests)).wasSuccessful():
-    rc = 1
-if not runner.run(unittest.makeSuite(AclModifyTests)).wasSuccessful():
-    rc = 1
-if not runner.run(unittest.makeSuite(AclDeleteTests)).wasSuccessful():
-    rc = 1
-if not runner.run(unittest.makeSuite(AclRenameTests)).wasSuccessful():
-    rc = 1
-
-# Get the old "dSHeuristics" if it was set
-dsheuristics = ldb.get_dsheuristics()
-# Set the "dSHeuristics" to activate the correct "userPassword" behaviour
-ldb.set_dsheuristics("000000001")
-# Get the old "minPwdAge"
-minPwdAge = ldb.get_minPwdAge()
-# Set it temporarely to "0"
-ldb.set_minPwdAge("0")
-if not runner.run(unittest.makeSuite(AclCARTests)).wasSuccessful():
-    rc = 1
-if not runner.run(unittest.makeSuite(AclSearchTests)).wasSuccessful():
-    rc = 1
-# Reset the "dSHeuristics" as they were before
-ldb.set_dsheuristics(dsheuristics)
-# Reset the "minPwdAge" as it was before
-ldb.set_minPwdAge(minPwdAge)
-
-if not runner.run(unittest.makeSuite(AclExtendedTests)).wasSuccessful():
-    rc = 1
-if not runner.run(unittest.makeSuite(AclSPNTests)).wasSuccessful():
+suite = unittest.TestSuite()
+suite.addTests(unittest.makeSuite(AclAddTests))
+suite.addTests(unittest.makeSuite(AclModifyTests))
+suite.addTests(unittest.makeSuite(AclDeleteTests))
+suite.addTests(unittest.makeSuite(AclRenameTests))
+suite.addTests(unittest.makeSuite(AclCARTests))
+suite.addTests(unittest.makeSuite(AclSearchTests))
+suite.addTests(unittest.makeSuite(AclExtendedTests))
+suite.addTests(unittest.makeSuite(AclSPNTests))
+if not runner.run(suite).wasSuccessful():
     rc = 1
+else:
+    rc = 0
 sys.exit(rc)
diff --git a/source4/dsdb/tests/python/dirsync.py b/source4/dsdb/tests/python/dirsync.py
index f36a3c0..14810d3 100755
--- a/source4/dsdb/tests/python/dirsync.py
+++ b/source4/dsdb/tests/python/dirsync.py
@@ -77,12 +77,12 @@ class DirsyncBaseTests(samba.tests.TestCase):
 
     def setUp(self):
         super(DirsyncBaseTests, self).setUp()
-        self.ldb_admin = ldb
-        self.base_dn = ldb.domain_dn()
-        self.domain_sid = security.dom_sid(ldb.get_domain_sid())
+        self.ldb_admin = SamDB(ldapshost, credentials=creds, session_info=system_session(lp), lp=lp)
+        self.base_dn = self.ldb_admin.domain_dn()
+        self.domain_sid = security.dom_sid(self.ldb_admin.get_domain_sid())
         self.user_pass = "samba123 at AAA"
         self.configuration_dn = self.ldb_admin.get_config_basedn().get_linearized()
-        self.sd_utils = sd_utils.SDUtils(ldb)
+        self.sd_utils = sd_utils.SDUtils(self.ldb_admin)
         #used for anonymous login
         print "baseDN: %s" % self.base_dn
 
@@ -142,7 +142,6 @@ class SimpleDirsyncTests(DirsyncBaseTests):
 
     #def test_dirsync_errors(self):
 
-
     def test_dirsync_supported(self):
         """Test the basic of the dirsync is supported"""
         self.ldb_dirsync = self.get_ldb_connection(self.dirsync_user, self.user_pass)
@@ -222,9 +221,6 @@ class SimpleDirsyncTests(DirsyncBaseTests):
             print l
             self.assertTrue(str(l).find("LDAP_UNWILLING_TO_PERFORM") != -1)
 
-
-
-
     def test_dirsync_attributes(self):
         """Check behavior with some attributes """
         res = self.ldb_admin.search(self.base_dn,
@@ -590,7 +586,9 @@ class SimpleDirsyncTests(DirsyncBaseTests):
                                     expression="(&(objectClass=organizationalUnit)(!(isDeleted=*)))",
                                     controls=controls)
 
+
 class ExtendedDirsyncTests(SimpleDirsyncTests):
+
     def test_dirsync_linkedattributes(self):
         flag_incr_linked = 2147483648
         self.ldb_simple = self.get_ldb_connection(self.simple_user, self.user_pass)
@@ -698,14 +696,13 @@ class ExtendedDirsyncTests(SimpleDirsyncTests):
         self.assertEqual(str(res[0].dn), "")
 
 
-ldb = SamDB(ldapshost, credentials=creds, session_info=system_session(lp), lp=lp)
-
 runner = SubunitTestRunner()
-rc = 0
-#
-if not runner.run(unittest.makeSuite(SimpleDirsyncTests)).wasSuccessful():
-    rc = 1
-if not runner.run(unittest.makeSuite(ExtendedDirsyncTests)).wasSuccessful():
+suite = unittest.TestSuite()
+suite.addTests(unittest.makeSuite(SimpleDirsyncTests))
+suite.addTests(unittest.makeSuite(ExtendedDirsyncTests))
+if not runner.run(suite).wasSuccessful():
     rc = 1
+else:
+    rc = 0
 
 sys.exit(rc)
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index f6b08e4..b1f0d6a 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -71,8 +71,6 @@ class BasicTests(samba.tests.TestCase):
         self.schema_dn = ldb.get_schema_basedn().get_linearized()
         self.domain_sid = security.dom_sid(ldb.get_domain_sid())
 
-        print "baseDN: %s\n" % self.base_dn
-
         delete_force(self.ldb, "cn=posixuser,cn=users," + self.base_dn)
         delete_force(self.ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
         delete_force(self.ldb, "cn=ldaptestuser2,cn=users," + self.base_dn)
@@ -99,8 +97,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_objectclasses(self):
         """Test objectClass behaviour"""
-        print "Test objectClass behaviour"""
-
         # Invalid objectclass specified
         try:
             self.ldb.add({
@@ -452,8 +448,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_system_only(self):
         """Test systemOnly objects"""
-        print "Test systemOnly objects"""
-
         try:
             self.ldb.add({
                 "dn": "cn=ldaptestobject," + self.base_dn,
@@ -539,8 +533,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_invalid_parent(self):
         """Test adding an object with invalid parent"""
-        print "Test adding an object with invalid parent"""
-
         try:
             self.ldb.add({
                 "dn": "cn=ldaptestgroup,cn=thisdoesnotexist123,"
@@ -565,8 +557,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_invalid_attribute(self):
         """Test invalid attributes on schema/objectclasses"""
-        print "Test invalid attributes on schema/objectclasses"""
-
         # attributes not in schema test
 
         # add operation
@@ -667,8 +657,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_single_valued_attributes(self):
         """Test single-valued attributes"""
-        print "Test single-valued attributes"
-
         try:
             self.ldb.add({
                 "dn": "cn=ldaptestgroup,cn=users," + self.base_dn,
@@ -712,8 +700,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_attribute_ranges(self):
         """Test attribute ranges"""
-        print "Test attribute ranges"
-
         # Too short (min. 1)
         try:
             ldb.add({
@@ -767,8 +753,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_empty_messages(self):
         """Test empty messages"""
-        print "Test empty messages"
-
         m = Message()
         m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
 
@@ -788,8 +772,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_empty_attributes(self):
         """Test empty attributes"""
-        print "Test empty attributes"
-
         m = Message()
         m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
         m["objectClass"] = MessageElement("group", FLAG_MOD_ADD, "objectClass")
@@ -833,8 +815,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_instanceType(self):
         """Tests the 'instanceType' attribute"""
-        print "Tests the 'instanceType' attribute"
-
         # The instance type is single-valued
         try:
             self.ldb.add({
@@ -913,8 +893,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_distinguished_name(self):
         """Tests the 'distinguishedName' attribute"""
-        print "Tests the 'distinguishedName' attribute"
-
         # The "dn" shortcut isn't supported
         m = Message()
         m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
@@ -993,8 +971,6 @@ class BasicTests(samba.tests.TestCase):
 
     def test_rdn_name(self):
         """Tests the RDN"""
-        print "Tests the RDN"
-
         # Search
 
         # empty RDN
@@ -1188,8 +1164,6 @@ objectClass: container
 
     def test_rename(self):
         """Tests the rename operation"""
-        print "Tests the rename operations"
-
         try:
             # cannot rename to be a child of itself
             ldb.rename(self.base_dn, "dc=test," + self.base_dn)
@@ -1299,8 +1273,6 @@ objectClass: container
 
     def test_rename_twice(self):
         """Tests the rename operation twice - this corresponds to a past bug"""
-        print "Tests the rename twice operation"
-
         self.ldb.add({
              "dn": "cn=ldaptestuser5,cn=users," + self.base_dn,
              "objectclass": "user" })
@@ -1312,17 +1284,13 @@ objectClass: container
              "objectclass": "user" })
         ldb.rename("cn=ldaptestuser5,cn=Users," + self.base_dn, "cn=ldaptestUSER5,cn=users," + self.base_dn)
         res = ldb.search(expression="cn=ldaptestuser5")
-        print "Found %u records" % len(res)
         self.assertEquals(len(res), 1, "Wrong number of hits for cn=ldaptestuser5")
         res = ldb.search(expression="(&(cn=ldaptestuser5)(objectclass=user))")
-        print "Found %u records" % len(res)
         self.assertEquals(len(res), 1, "Wrong number of hits for (&(cn=ldaptestuser5)(objectclass=user))")
         delete_force(self.ldb, "cn=ldaptestuser5,cn=users," + self.base_dn)
 
     def test_objectGUID(self):
         """Test objectGUID behaviour"""
-        print "Testing objectGUID behaviour\n"
-
         # The objectGUID cannot directly be set
         try:
             self.ldb.add_ldif("""
@@ -1354,8 +1322,6 @@ objectGUID: bd3480c9-58af-4cd8-92df-bc4a18b6e44d
 
     def test_parentGUID(self):
         """Test parentGUID behaviour"""
-        print "Testing parentGUID behaviour\n"
-
         self.ldb.add({
             "dn": "cn=parentguidtest,cn=users," + self.base_dn,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list