Skip to content

Commit bf37c10

Browse files
committed
Add test for PrintableString's __repr__
Signed-off-by: Facundo Tuesca <[email protected]>
1 parent 71c0586 commit bf37c10

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/hazmat/asn1/test_api.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@
99
import cryptography.hazmat.asn1 as asn1
1010

1111

12-
class TestClassAPI:
12+
class TestTypesAPI:
13+
def test_repr_printable_string(self) -> None:
14+
assert (
15+
repr(asn1.PrintableString("MyString"))
16+
== "PrintableString(MyString)"
17+
)
18+
19+
20+
class TestSequenceAPI:
1321
def test_fail_unsupported_field(self) -> None:
1422
# Not a sequence
1523
class Unsupported:

0 commit comments

Comments
 (0)