diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-08-26 15:59:00 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-08-26 15:59:00 +1000 |
commit | 425386ff6141bba2e7b1d8f3c27e96aaf1c5cb95 (patch) | |
tree | 645da53767294cab003826df87a2502505c798b5 /source4/lib/ldb/tests/python/api.py | |
parent | 3ed33813bb6aa1ca932372c2a2ce36152b6af50b (diff) | |
download | samba-425386ff6141bba2e7b1d8f3c27e96aaf1c5cb95.tar.gz samba-425386ff6141bba2e7b1d8f3c27e96aaf1c5cb95.tar.bz2 samba-425386ff6141bba2e7b1d8f3c27e96aaf1c5cb95.zip |
s4:ldb Add ldb_ldif_write_string() and python wrappers
This allows us to turn a python LdbMessage back into a string.
Andrew Bartlett
Diffstat (limited to 'source4/lib/ldb/tests/python/api.py')
-rwxr-xr-x | source4/lib/ldb/tests/python/api.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py index 9bcb225190..88983ac738 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -402,7 +402,9 @@ class DnTests(unittest.TestCase): msg = msgs.next() self.assertEquals("foo=bar", str(msg[1].dn)) self.assertTrue(isinstance(msg[1], ldb.Message)) - + ldif = self.ldb.write_ldif(msg[1], ldb.CHANGETYPE_NONE) + self.assertEquals("dn: foo=bar\n\n", ldif) + def test_parse_ldif_more(self): msgs = self.ldb.parse_ldif("dn: foo=bar\n\n\ndn: bar=bar") msg = msgs.next() |