diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-04-15 18:41:56 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-04-15 18:45:41 +0200 |
commit | 13bbfa3fcabfc97a57ae56ef916bf13137fb5290 (patch) | |
tree | 26be3d8c069a02d8c1a21784e7d5b38bf395e18c /source4/scripting | |
parent | ce28f854c0c8c62c6f13989ec4d2f9e890ffd0e1 (diff) | |
download | samba-13bbfa3fcabfc97a57ae56ef916bf13137fb5290.tar.gz samba-13bbfa3fcabfc97a57ae56ef916bf13137fb5290.tar.bz2 samba-13bbfa3fcabfc97a57ae56ef916bf13137fb5290.zip |
pydsdb: Fix memory leak on invalid parameters, formatting, trivial
typos.
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/tests/dsdb.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source4/scripting/python/samba/tests/dsdb.py b/source4/scripting/python/samba/tests/dsdb.py index ed41d87f3d..86ec3ecd6c 100644 --- a/source4/scripting/python/samba/tests/dsdb.py +++ b/source4/scripting/python/samba/tests/dsdb.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Unix SMB/CIFS implementation. Tests for glue helper +# Unix SMB/CIFS implementation. Tests for dsdb # Copyright (C) Matthieu Patou <mat@matws.net> 2010 # # This program is free software; you can redistribute it and/or modify @@ -18,27 +18,25 @@ # import samba.dsdb -import samba.param from samba.credentials import Credentials from samba import Ldb from samba.auth import system_session -from testtools.testcase import TestCase, TestSkipped -import random +from testtools.testcase import TestCase import os -class GlueTests(TestCase): +class DsdbTests(TestCase): def _baseprovpath(self): return os.path.join(os.environ['SELFTEST_PREFIX'], "dc") def test_get_oid_from_attrid(self): lp = samba.param.LoadParm() - lp.load(os.path.join(os.path.join(self._baseprovpath(),"etc"),"smb.conf")) + lp.load(os.path.join(os.path.join(self._baseprovpath(), "etc"), "smb.conf")) creds = Credentials() creds.guess(lp) session = system_session() - test_ldb = Ldb(os.path.join(os.path.join(self._baseprovpath(),"private"),"sam.ldb"), session_info=session, credentials=creds,lp=lp) - oid = samba.dsdb.dsdb_get_oid_from_attid(test_ldb,591614) + test_ldb = Ldb(os.path.join(self._baseprovpath(), "private", "sam.ldb"), + session_info=session, credentials=creds,lp=lp) + oid = samba.dsdb.dsdb_get_oid_from_attid(test_ldb, 591614) self.assertEquals(oid, "1.2.840.113556.1.4.1790") - |