1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-11 08:23:49 +03:00

r26628: python: Add more documentation, simplify code in Samba3 module.

(This used to be commit 3c329ee73d)
This commit is contained in:
Jelmer Vernooij
2007-12-29 18:14:15 -06:00
committed by Stefan Metzmacher
parent ac65321a46
commit 6817c5d885
7 changed files with 175 additions and 87 deletions

View File

@@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""Samba Python tests."""
import os
import ldb
import samba
@@ -24,11 +26,13 @@ import tempfile
import unittest
class LdbTestCase(unittest.TestCase):
"""Trivial test case for running tests against a LDB."""
def setUp(self):
self.filename = os.tempnam()
self.ldb = samba.Ldb(self.filename)
def set_modules(self, modules=[]):
"""Change the modules for this Ldb."""
m = ldb.Message()
m.dn = ldb.Dn(self.ldb, "@MODULES")
m["@LIST"] = ",".join(modules)