diff options
| author | Quentin Pradet <quentin.pradet@gmail.com> | 2020-01-14 11:27:42 +0400 |
|---|---|---|
| committer | Seth Michael Larson <sethmichaellarson@gmail.com> | 2020-01-14 13:05:08 -0600 |
| commit | 4903840bf36a05bcc8299f6553ff7a1816d4aa63 (patch) | |
| tree | 4e54e3cdc55b3ec0f3189820288564b2da438d02 /test/with_dummyserver | |
| parent | 9971e27e83a891ba7b832fa9e5d2f04bbcb1e65f (diff) | |
| download | urllib3-4903840bf36a05bcc8299f6553ff7a1816d4aa63.tar.gz | |
Use trustme to generate IP_SAN cert
Diffstat (limited to 'test/with_dummyserver')
| -rw-r--r-- | test/with_dummyserver/test_https.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/with_dummyserver/test_https.py b/test/with_dummyserver/test_https.py index 4a01d8de..fdf5dcc5 100644 --- a/test/with_dummyserver/test_https.py +++ b/test/with_dummyserver/test_https.py @@ -21,7 +21,6 @@ from dummyserver.server import ( IPV6_ADDR_CERTS, IPV6_ADDR_CA, HAS_IPV6, - IP_SAN_CERTS, IPV6_SAN_CERTS, IPV6_SAN_CA, PASSWORD_CLIENT_KEYFILE, @@ -721,10 +720,8 @@ class TestHTTPS_NoSAN: assert warn.called -class TestHTTPS_IPSAN(HTTPSDummyServerTestCase): - certs = IP_SAN_CERTS - - def test_can_validate_ip_san(self): +class TestHTTPS_IPSAN: + def test_can_validate_ip_san(self, ip_san_server): """Ensure that urllib3 can validate SANs with IP addresses in them.""" try: import ipaddress # noqa: F401 @@ -732,7 +729,10 @@ class TestHTTPS_IPSAN(HTTPSDummyServerTestCase): pytest.skip("Only runs on systems with an ipaddress module") with HTTPSConnectionPool( - "127.0.0.1", self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA + ip_san_server.host, + ip_san_server.port, + cert_reqs="CERT_REQUIRED", + ca_certs=ip_san_server.ca_certs, ) as https_pool: r = https_pool.request("GET", "/") assert r.status == 200 |
