File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
import ldif
12
12
import ldap .schema
13
+ from ldap .schema .models import ObjectClass
13
14
14
15
TEST_SUBSCHEMA_FILES = (
15
16
'Tests/ldif/subschema-ipa.demo1.freeipa.org.ldif' ,
@@ -30,6 +31,15 @@ def test_subschema_file(self):
30
31
_ , subschema_subentry = ldif_parser .all_records [0 ]
31
32
sub_schema = ldap .schema .SubSchema (subschema_subentry )
32
33
34
+ # Smoke-check for listall() and attribute_types()
35
+ for objclass in sub_schema .listall (ObjectClass ):
36
+ must , may = sub_schema .attribute_types ([objclass ])
37
+
38
+ for oid , attributetype in must .items ():
39
+ self .assertEqual (attributetype .oid , oid )
40
+ for oid , attributetype in may .items ():
41
+ self .assertEqual (attributetype .oid , oid )
42
+
33
43
34
44
if __name__ == '__main__' :
35
45
unittest .main ()
You can’t perform that action at this time.
0 commit comments