Skip to content

Commit

Permalink
Fix test case assertion depending on python version
Browse files Browse the repository at this point in the history
  • Loading branch information
pini-gh committed Dec 12, 2023
1 parent 327a153 commit 564c646
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 564c646

Please sign in to comment.