From 979215ad59e3a1dcb2dddeb1749d8f2eb1a920c3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 6 Jul 2012 19:57:10 +1000 Subject: pyldb: Add bindings for ldb_dn_remove_base_components --- lib/ldb/tests/python/api.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/ldb/tests/python') 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() -- cgit