Skip to content

Commit e658985

Browse files
committed
Fix test case assertion depending on python version
1 parent b3caaa7 commit e658985

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_ssl/wildcard_cert_and_nohttps/test_wildcard_cert_nohttps.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def test_https_get_served(docker_compose, nginxproxy, subdomain):
2727
def test_https_request_to_nohttps_vhost_goes_to_fallback_server(docker_compose, nginxproxy):
2828
with pytest.raises( (CertificateError, SSLError) ) as excinfo:
2929
nginxproxy.get("https://3.web.nginx-proxy.tld/port")
30-
assert """certificate is not valid for '3.web.nginx-proxy.tld'""" in str(excinfo.value)
30+
assert """certificate is not valid for '3.web.nginx-proxy.tld'""" in str(excinfo.value) or \
31+
"""hostname '3.web.nginx-proxy.tld' doesn't match 'nginx-proxy.tld'""" in str(excinfo.value)
3132

3233
r = nginxproxy.get("https://3.web.nginx-proxy.tld/port", verify=False)
3334
assert r.status_code == 503

0 commit comments

Comments
 (0)