aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2018-03-05 11:36:08 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2018-03-05 10:36:08 -0500
commit388d1bd3e9cd953fcc948edbc152d5d140c87eb8 (patch)
tree2f4706308b3d5846a457bdc4d49e02eed4265576 /tests
parent96787f954bf89b12dfc3f8744bcb0998b2f0c22f (diff)
downloadcryptography-388d1bd3e9cd953fcc948edbc152d5d140c87eb8.tar.gz
cryptography-388d1bd3e9cd953fcc948edbc152d5d140c87eb8.tar.bz2
cryptography-388d1bd3e9cd953fcc948edbc152d5d140c87eb8.zip
don't allow GeneralNames to be an empty list (#4128)
* don't allow GeneralNames to be an empty list * flake8
Diffstat (limited to 'tests')
-rw-r--r--tests/x509/test_x509_ext.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/x509/test_x509_ext.py b/tests/x509/test_x509_ext.py
index 9f4e1758..b048c140 100644
--- a/tests/x509/test_x509_ext.py
+++ b/tests/x509/test_x509_ext.py
@@ -2052,6 +2052,10 @@ class TestGeneralNames(object):
[x509.DNSName(u"cryptography.io"), "invalid"]
)
+ def test_does_not_allow_empty_list(self):
+ with pytest.raises(ValueError):
+ x509.GeneralNames([])
+
def test_repr(self):
gns = x509.GeneralNames(
[