summaryrefslogtreecommitdiff
path: root/lib/ldb/tests/python/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ldb/tests/python/api.py')
-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()