summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-12-27 14:07:50 +0100
committerStefan Metzmacher <metze@samba.org>2010-12-27 15:37:58 +0100
commitfd4436abfe52577ed029c58054edd09c720d7e0d (patch)
tree3315bb26e1dc96b6cdd92087e6c8309ff0a7c8ee /source4
parentaaa16b8224ecabda9a810246d445dcbcd02c8b86 (diff)
downloadsamba-fd4436abfe52577ed029c58054edd09c720d7e0d.tar.gz
samba-fd4436abfe52577ed029c58054edd09c720d7e0d.tar.bz2
samba-fd4436abfe52577ed029c58054edd09c720d7e0d.zip
s4:ldb:python/api: use filename() instead of hardcoded filenames
metze
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/lib/ldb/tests/python/api.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py
index 17c3172842..cd9651e6f6 100755
--- a/source4/lib/ldb/tests/python/api.py
+++ b/source4/lib/ldb/tests/python/api.py
@@ -449,11 +449,11 @@ class LdbMsgTests(unittest.TestCase):
def test_iter_items(self):
self.assertEquals(0, len(self.msg.items()))
- self.msg.dn = ldb.Dn(ldb.Ldb("foo.tdb"), "dc=foo28")
+ self.msg.dn = ldb.Dn(ldb.Ldb(filename()), "dc=foo28")
self.assertEquals(1, len(self.msg.items()))
def test_repr(self):
- self.msg.dn = ldb.Dn(ldb.Ldb("foo.tdb"), "dc=foo29")
+ self.msg.dn = ldb.Dn(ldb.Ldb(filename()), "dc=foo29")
self.msg["dc"] = "foo"
self.assertEquals("Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})", repr(self.msg))
@@ -495,7 +495,7 @@ class LdbMsgTests(unittest.TestCase):
self.assertEquals(["bar"], list(self.msg["foo"]))
def test_keys(self):
- self.msg.dn = ldb.Dn(ldb.Ldb("foo.tdb"), "@BASEINFO")
+ self.msg.dn = ldb.Dn(ldb.Ldb(filename()), "@BASEINFO")
self.msg["foo"] = ["bla"]
self.msg["bar"] = ["bla"]
self.assertEquals(["dn", "foo", "bar"], self.msg.keys())
@@ -505,11 +505,11 @@ class LdbMsgTests(unittest.TestCase):
self.assertEquals("@BASEINFO", self.msg.dn.__str__())
def test_get_dn(self):
- self.msg.dn = ldb.Dn(ldb.Ldb("foo.tdb"), "@BASEINFO")
+ self.msg.dn = ldb.Dn(ldb.Ldb(filename()), "@BASEINFO")
self.assertEquals("@BASEINFO", self.msg.get("dn").__str__())
def test_get_invalid(self):
- self.msg.dn = ldb.Dn(ldb.Ldb("foo.tdb"), "@BASEINFO")
+ self.msg.dn = ldb.Dn(ldb.Ldb(filename()), "@BASEINFO")
self.assertRaises(TypeError, self.msg.get, 42)
def test_get_other(self):
@@ -535,7 +535,7 @@ class LdbMsgTests(unittest.TestCase):
self.assertEquals(msg1, msg2)
def test_equal_simplel(self):
- db = ldb.Ldb("foo.tdb")
+ db = ldb.Ldb(filename())
msg1 = ldb.Message()
msg1.dn = ldb.Dn(db, "foo=bar")
msg2 = ldb.Message()