s4:ldap.py - add a test in order to show the operational module fixed
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 4 Mar 2011 21:49:08 +0000 (22:49 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 4 Mar 2011 22:09:44 +0000 (23:09 +0100)
Reviewed by: Tridge

source4/dsdb/tests/python/ldap.py

index d546717da92c0a816e2a38c5c5e6899397ead3e4..e9e5a0a117724ce2d1b7ccc495007f0e0513bc9b 100755 (executable)
@@ -2659,6 +2659,20 @@ nTSecurityDescriptor:: """ + desc_base64
         self.assertEquals(len(res.controls), 1)
         self.assertEquals(res.controls[0].oid, "1.2.840.113556.1.4.319")
 
+    def test_operational(self):
+        """Tests operational attributes"""
+        print "Tests operational attributes"""
+
+        res = self.ldb.search(self.base_dn, scope=SCOPE_BASE,
+                              attrs=["createTimestamp", "modifyTimestamp",
+                                     "structuralObjectClass", "whenCreated",
+                                     "whenChanged"])
+        self.assertEquals(len(res), 1)
+        self.assertTrue("createTimestamp" in res[0])
+        self.assertTrue("modifyTimestamp" in res[0])
+        self.assertTrue("structuralObjectClass" in res[0])
+        self.assertTrue("whenCreated" in res[0])
+        self.assertTrue("whenChanged" in res[0])
 
 class BaseDnTests(unittest.TestCase):