let's make that repr actually good
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py
index b3f889e..a50c055 100644
--- a/src/cryptography/x509.py
+++ b/src/cryptography/x509.py
@@ -191,7 +191,7 @@
return len(self._attributes)
def __repr__(self):
- return repr(self._attributes)
+ return "<Name({0})>".format(self._attributes)
OID_SUBJECT_DIRECTORY_ATTRIBUTES = ObjectIdentifier("2.5.29.9")
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 7e7d4dd..d8a4cc0 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -615,7 +615,8 @@
])
assert repr(name) == (
- "[<NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.3, name=commonN"
- "ame)>, value='cryptography.io')>, <NameAttribute(oid=<ObjectIde"
- "ntifier(oid=2.5.4.10, name=organizationName)>, value='PyCA')>]"
+ "<Name([<NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.3, name=com"
+ "monName)>, value='cryptography.io')>, <NameAttribute(oid=<ObjectI"
+ "dentifier(oid=2.5.4.10, name=organizationName)>, value='PyCA')>])"
+ ">"
)