Lines Matching refs:univ
18 from pyasn1.type import univ
35 assert decoder.decode(12, asn1Spec=univ.Integer()) == univ.Integer(12)
38 assert decoder.decode(-12, asn1Spec=univ.Integer()) == univ.Integer(-12)
43 assert decoder.decode(True, asn1Spec=univ.Boolean()) == univ.Boolean(True)
46 assert decoder.decode(False, asn1Spec=univ.Boolean()) == univ.Boolean(False)
51 … assert decoder.decode('11111111', asn1Spec=univ.BitString()) == univ.BitString(hexValue='ff')
56 …assert decoder.decode('Quick brown fox', asn1Spec=univ.OctetString()) == univ.OctetString('Quick b…
61 assert decoder.decode(None, asn1Spec=univ.Null()) == univ.Null('')
66 …assert decoder.decode('1.3.6.11', asn1Spec=univ.ObjectIdentifier()) == univ.ObjectIdentifier('1.3.…
71 assert decoder.decode(1.33, asn1Spec=univ.Real()) == univ.Real(1.33)
78 self.s = univ.Sequence(
80 namedtype.NamedType('place-holder', univ.Null()),
81 namedtype.NamedType('first-name', univ.OctetString()),
82 namedtype.NamedType('age', univ.Integer(33))
88 s[0] = univ.Null('')
89 s[1] = univ.OctetString('xx')
90 s[2] = univ.Integer(33)
98 self.s = univ.Choice(
100 namedtype.NamedType('place-holder', univ.Null()),
101 namedtype.NamedType('first-name', univ.OctetString()),
102 namedtype.NamedType('age', univ.Integer(33))
108 s[1] = univ.OctetString('xx')
116 self.s = univ.Any()
119 assert decoder.decode('fox', asn1Spec=univ.Any()) == univ.Any('fox')