summaryrefslogtreecommitdiff
path: root/lib/ldb/tests/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-07-06 19:57:10 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-07-06 22:55:49 +1000
commit979215ad59e3a1dcb2dddeb1749d8f2eb1a920c3 (patch)
treebca2ea85ced512f58ca55279c4564b4850cdf115 /lib/ldb/tests/python
parente4077a8ca57c044bdd177dba1cbb81c3b802fe4c (diff)
downloadsamba-979215ad59e3a1dcb2dddeb1749d8f2eb1a920c3.tar.gz
samba-979215ad59e3a1dcb2dddeb1749d8f2eb1a920c3.tar.bz2
samba-979215ad59e3a1dcb2dddeb1749d8f2eb1a920c3.zip
pyldb: Add bindings for ldb_dn_remove_base_components
Diffstat (limited to 'lib/ldb/tests/python')
-rwxr-xr-xlib/ldb/tests/python/api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index d04d0cc5ed..7df40e4a5a 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -416,6 +416,11 @@ class DnTests(TestCase):
y = ldb.Dn(self.ldb, "bar=bla")
self.assertEquals("dc=foo24,bar=bla", str(x + y))
+ def test_remove_base_components(self):
+ x = ldb.Dn(self.ldb, "dc=foo24,dc=samba,dc=org")
+ x.remove_base_components(len(x)-1)
+ self.assertEquals("dc=foo24", str(x))
+
def test_parse_ldif(self):
msgs = self.ldb.parse_ldif("dn: foo=bar\n")
msg = msgs.next()