aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-06-19 01:00:42 -1000
committerAlex Gaynor <alex.gaynor@gmail.com>2017-06-19 07:00:42 -0400
commit312ed095d81f85e6689be5d11072440117fd8d72 (patch)
treef85e87cd21189adfbec2bae6b4ac94b19caba097 /tests
parent63df0102a4f9ba01bbff4ccf61491f53dbf8f4c2 (diff)
downloadcryptography-312ed095d81f85e6689be5d11072440117fd8d72.tar.gz
cryptography-312ed095d81f85e6689be5d11072440117fd8d72.tar.bz2
cryptography-312ed095d81f85e6689be5d11072440117fd8d72.zip
disallow empty string for NameAttribute (#3711)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 84108810..7a99ff3d 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -3624,6 +3624,10 @@ class TestNameAttribute(object):
u'\U0001F37A\U0001F37A'
)
+ def test_init_empty_value(self):
+ with pytest.raises(ValueError):
+ x509.NameAttribute(NameOID.ORGANIZATION_NAME, u'')
+
def test_eq(self):
assert x509.NameAttribute(
x509.ObjectIdentifier('2.999.1'), u'value'