From: Matthieu Patou Date: Wed, 9 Feb 2011 09:50:35 +0000 (+0300) Subject: pyldb: add tests for getting control results X-Git-Tag: tevent-0.9.11~452 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=175227bc7195931a264bca17e4993d982480294d;p=thirdparty%2Fsamba.git pyldb: add tests for getting control results --- diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py index d67ccc44a74..d324d40cc76 100755 --- a/source4/dsdb/tests/python/ldap.py +++ b/source4/dsdb/tests/python/ldap.py @@ -2584,6 +2584,14 @@ nTSecurityDescriptor:: """ + desc_base64 # restore old value self.ldb.set_dsheuristics(dsheuristics) + def test_ldapControlReturn(self): + """Testing that if we request a control that return a control it + really return something""" + res = self.ldb.search(attrs=["cn"], + controls=["paged_result:1:10"]) + self.assertEquals(len(res.controls), 1) + self.assertEquals(res.controls[0].oid, "1.2.840.113556.1.4.319") + class BaseDnTests(unittest.TestCase):