1
0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-11-08 15:59:17 +01:00

Fix test case assertion depending on python version

This commit is contained in:
Gilles Filippini 2023-12-12 19:24:14 +01:00
parent 980470377a
commit 5d2f51dfe2

@ -27,7 +27,8 @@ def test_https_get_served(docker_compose, nginxproxy, subdomain):
def test_https_request_to_nohttps_vhost_goes_to_fallback_server(docker_compose, nginxproxy):
with pytest.raises( (CertificateError, SSLError) ) as excinfo:
nginxproxy.get("https://3.web.nginx-proxy.tld/port")
assert """certificate is not valid for '3.web.nginx-proxy.tld'""" in str(excinfo.value)
assert """certificate is not valid for '3.web.nginx-proxy.tld'""" in str(excinfo.value) or \
"""hostname '3.web.nginx-proxy.tld' doesn't match 'nginx-proxy.tld'""" in str(excinfo.value)
r = nginxproxy.get("https://3.web.nginx-proxy.tld/port", verify=False)
assert r.status_code == 503