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

r26537: Support ldb.add({'dn': 'dc=foo,bar=bla', ...}).

This commit is contained in:
Jelmer Vernooij
2007-12-19 23:27:34 +01:00
committed by Stefan Metzmacher
parent 43c8bfeedf
commit e91fe76d29
4 changed files with 197 additions and 199 deletions

View File

@@ -119,6 +119,16 @@ class SimpleLdb(unittest.TestCase):
finally:
l.delete(ldb.Dn(l, "dc=foo"))
def test_add_dict_string_dn(self):
l = ldb.Ldb("foo.tdb")
m = {"dn": "dc=foo", "bla": "bla"}
self.assertEquals(len(l.search()), 1)
l.add(m)
try:
self.assertEquals(len(l.search()), 2)
finally:
l.delete(ldb.Dn(l, "dc=foo"))
def test_rename(self):
l = ldb.Ldb("foo.tdb")
m = ldb.Message()