aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2015-02-12 19:56:21 -0500
committerDonald Stufft <donald@stufft.io>2015-02-12 19:56:21 -0500
commitcd9bdcddf7ea7fe041ffcb01965a035e64ab719e (patch)
tree0223f4fd825e1d565610e84db00a83211f7a222c /tests
parenta9c131789609d0d4340624435ae6ca794f225203 (diff)
parenta498be81b54f8e4a9b07a71aabc434e372c309a6 (diff)
downloadcryptography-cd9bdcddf7ea7fe041ffcb01965a035e64ab719e.tar.gz
cryptography-cd9bdcddf7ea7fe041ffcb01965a035e64ab719e.tar.bz2
cryptography-cd9bdcddf7ea7fe041ffcb01965a035e64ab719e.zip
Merge pull request #1656 from reaperhulk/nameattribute-repr
add repr for x509.NameAttribute
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 38231205..09275207 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -277,6 +277,13 @@ class TestNameAttribute(object):
x509.ObjectIdentifier('oid'), 'value'
) != object()
+ def test_repr(self):
+ na = x509.NameAttribute(x509.ObjectIdentifier('2.5.4.3'), 'value')
+ assert repr(na) == (
+ "<NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.3, name=commonName"
+ ")>, value='value')>"
+ )
+
class TestObjectIdentifier(object):
def test_eq(self):