summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadezhda Ivanova <nivanova@samba.org>2010-11-25 01:11:29 +0200
committerNadezhda Ivanova <nivanova@samba.org>2010-11-25 01:11:29 +0200
commitf42802e22fa0f0a2026036d540cd5f3341870557 (patch)
tree043daa5ba3523963c71aad1feb3cf574de22472e
parentd7731f6f39eb4887a4f91a5b5dbc969b1b0596d2 (diff)
downloadsamba-f42802e22fa0f0a2026036d540cd5f3341870557.tar.gz
samba-f42802e22fa0f0a2026036d540cd5f3341870557.tar.bz2
samba-f42802e22fa0f0a2026036d540cd5f3341870557.zip
s4-tests: Modified bind.py to use samba.tests.delete_force
-rwxr-xr-xsource4/auth/credentials/tests/bind.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/source4/auth/credentials/tests/bind.py b/source4/auth/credentials/tests/bind.py
index c59e714a88..8c93319ccd 100755
--- a/source4/auth/credentials/tests/bind.py
+++ b/source4/auth/credentials/tests/bind.py
@@ -26,6 +26,7 @@ from samba import gensec
from samba.samdb import SamDB
from samba.credentials import Credentials
import samba.tests
+from samba.tests import delete_force
from subunit.run import SubunitTestRunner
import unittest
@@ -70,18 +71,12 @@ class BindTests(samba.tests.TestCase):
self.password = "P@ssw0rd"
self.username = "BindTestUser_" + time.strftime("%s", time.gmtime())
- def delete_force(self, ldb, dn):
- try:
- ldb.delete(dn)
- except LdbError, (num, _):
- self.assertEquals(num, ERR_NO_SUCH_OBJECT)
-
def tearDown(self):
super(BindTests, self).tearDown()
def test_computer_account_bind(self):
# create a computer acocount for the test
- self.delete_force(ldb, self.computer_dn)
+ delete_force(ldb, self.computer_dn)
ldb.add_ldif("""
dn: """ + self.computer_dn + """
cn: CENTOS53