aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-05-17 22:17:05 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-05-17 22:17:05 -0400
commit0b0179f7311162084f2b8dc6a028e301ca2eb7b2 (patch)
tree24bb7fa8d9818272739bd2ad03dd2c6d32058e86 /tests
parent509bacbd475fce046524015ebb5e400e278c73fb (diff)
parenteb177931f825308f9b4df9c789f76b7ce04751f6 (diff)
downloadcryptography-0b0179f7311162084f2b8dc6a028e301ca2eb7b2.tar.gz
cryptography-0b0179f7311162084f2b8dc6a028e301ca2eb7b2.tar.bz2
cryptography-0b0179f7311162084f2b8dc6a028e301ca2eb7b2.zip
Merge pull request #1972 from reaperhulk/expand-ipaddress
IPAddress needs to support networks for nameconstraints
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509_ext.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py
index 572aa30c..d3488a9f 100644
--- a/tests/test_x509_ext.py
+++ b/tests/test_x509_ext.py
@@ -1121,6 +1121,12 @@ class TestIPAddress(object):
gn2 = x509.IPAddress(ipaddress.IPv6Address(u"ff::"))
assert repr(gn2) == "<IPAddress(value=ff::)>"
+ gn3 = x509.IPAddress(ipaddress.IPv4Network(u"192.168.0.0/24"))
+ assert repr(gn3) == "<IPAddress(value=192.168.0.0/24)>"
+
+ gn4 = x509.IPAddress(ipaddress.IPv6Network(u"ff::/96"))
+ assert repr(gn4) == "<IPAddress(value=ff::/96)>"
+
def test_eq(self):
gn = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
gn2 = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))