summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-02-09 12:50:35 +0300
committerMatthieu Patou <mat@matws.net>2011-02-21 10:56:00 +0300
commit175227bc7195931a264bca17e4993d982480294d (patch)
treee2eab74bb133ad8401d58de9289f46acfe1e848b /source4/dsdb/tests/python
parent95eb3020dee7cf775c59cd2f7ba388821445649d (diff)
downloadsamba-175227bc7195931a264bca17e4993d982480294d.tar.gz
samba-175227bc7195931a264bca17e4993d982480294d.tar.bz2
samba-175227bc7195931a264bca17e4993d982480294d.zip
pyldb: add tests for getting control results
Diffstat (limited to 'source4/dsdb/tests/python')
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index d67ccc44a7..d324d40cc7 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):