diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-19 23:27:34 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:51:57 +0100 |
commit | 6e2459211dbd59c8884049faa0d63c1712dbadfe (patch) | |
tree | 2a7c49a195a0de50930d6f640df1790213c26f9c /source4/lib/ldb/tests/python | |
parent | 86f91db7d5c84526b3fbd4369d7a56dc0f057b4c (diff) | |
download | samba-6e2459211dbd59c8884049faa0d63c1712dbadfe.tar.gz samba-6e2459211dbd59c8884049faa0d63c1712dbadfe.tar.bz2 samba-6e2459211dbd59c8884049faa0d63c1712dbadfe.zip |
r26537: Support ldb.add({'dn': 'dc=foo,bar=bla', ...}).
(This used to be commit e91fe76d296973430f71502c9b614d0dfac4d83c)
Diffstat (limited to 'source4/lib/ldb/tests/python')
-rwxr-xr-x | source4/lib/ldb/tests/python/api.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py index 3b4de044b0..b6d6170ec2 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -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() |