diff options
author | Joshua Tauberer <jt@occams.info> | 2015-07-06 22:37:53 +0000 |
---|---|---|
committer | Joshua Tauberer <jt@occams.info> | 2015-07-06 23:01:22 +0000 |
commit | d2afad325e2e9c52765b4a696d6f6b646c4e855b (patch) | |
tree | 9b8310e2668800dbb20bcb191b8a830d0a0e2f3b /tests/test_x509_ext.py | |
parent | 18b6fc84fcb671412aaaf453f623a44a30a1a2a3 (diff) | |
download | cryptography-d2afad325e2e9c52765b4a696d6f6b646c4e855b.tar.gz cryptography-d2afad325e2e9c52765b4a696d6f6b646c4e855b.tar.bz2 cryptography-d2afad325e2e9c52765b4a696d6f6b646c4e855b.zip |
special-case GeneralNames.get_values_for_type to return OtherName instances directly rather than their value properties; tests updated
Diffstat (limited to 'tests/test_x509_ext.py')
-rw-r--r-- | tests/test_x509_ext.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index e6ee7d66..993802b8 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -1642,14 +1642,13 @@ class TestRSASubjectAlternativeNameExtension(object): assert ext is not None assert ext.critical is False + expected = x509.OtherName(x509.ObjectIdentifier("1.2.3.4"), + b'\x16\x0bHello World') assert len(ext.value) == 1 - assert list(ext.value)[0] == \ - x509.OtherName( - x509.ObjectIdentifier("1.2.3.4"), - b'\x16\x0bHello World') + assert list(ext.value)[0] == expected othernames = ext.value.get_values_for_type(x509.OtherName) - assert othernames == [b'\x16\x0bHello World'] + assert othernames == [expected] @pytest.mark.requires_backend_interface(interface=RSABackend) |