aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-30 12:20:55 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-30 12:20:55 -0600
commit50e9dd8a9bb78e0da0e97cbed2fad7620ef997e4 (patch)
tree60955ced7d7d7e23b08960ff2a1978509174eef0
parent14fd697c5c4a2435b2113e425c95ac9c05702cc2 (diff)
downloadcryptography-50e9dd8a9bb78e0da0e97cbed2fad7620ef997e4.tar.gz
cryptography-50e9dd8a9bb78e0da0e97cbed2fad7620ef997e4.tar.bz2
cryptography-50e9dd8a9bb78e0da0e97cbed2fad7620ef997e4.zip
py3 repr will be different
-rw-r--r--tests/test_x509_ext.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py
index 258be12d..7c5ca5f2 100644
--- a/tests/test_x509_ext.py
+++ b/tests/test_x509_ext.py
@@ -107,10 +107,16 @@ class TestUnrecognizedExtension(object):
ext1 = x509.UnrecognizedExtension(
x509.ObjectIdentifier("1.2.3.4"), b"\x03\x02\x01"
)
- assert repr(ext1) == (
- "<UnrecognizedExtension(oid=<ObjectIdentifier(oid=1.2.3.4, name="
- "Unknown OID)>, value='\\x03\\x02\\x01')>"
- )
+ if six.PY3:
+ assert repr(ext1) == (
+ "<UnrecognizedExtension(oid=<ObjectIdentifier(oid=1.2.3.4, "
+ "name=Unknown OID)>, value=b'\\x03\\x02\\x01')>"
+ )
+ else:
+ assert repr(ext1) == (
+ "<UnrecognizedExtension(oid=<ObjectIdentifier(oid=1.2.3.4, "
+ "name=Unknown OID)>, value='\\x03\\x02\\x01')>"
+ )
def test_hash(self):
ext1 = x509.UnrecognizedExtension(