DEFINED BY support
[pyderasn.git] / tests / test_crts.py
index 5a839eb4d0059a1edf7d22056354226a9cd576ea..a096412333df3248740d3a467ba2eb43d47aa3d7 100644 (file)
@@ -37,6 +37,7 @@ from pyderasn import SequenceOf
 from pyderasn import SetOf
 from pyderasn import tag_ctxc
 from pyderasn import tag_ctxp
+from pyderasn import TeletexString
 from pyderasn import UTCTime
 
 
@@ -88,9 +89,22 @@ class AttributeValue(Any):
     pass
 
 
+class OrganizationName(Choice):
+    schema = (
+        ('printableString', PrintableString()),
+        ('teletexString', TeletexString()),
+    )
+
+
 class AttributeTypeAndValue(Sequence):
     schema = (
-        ("type", AttributeType()),
+        ("type", AttributeType(defines=("value", {
+            ObjectIdentifier("2.5.4.6"): PrintableString(),
+            ObjectIdentifier("2.5.4.8"): PrintableString(),
+            ObjectIdentifier("2.5.4.7"): PrintableString(),
+            ObjectIdentifier("2.5.4.10"): OrganizationName(),
+            ObjectIdentifier("2.5.4.3"): PrintableString(),
+        }))),
         ("value", AttributeValue()),
     )