This should work, right?

It's embarrassing that I didn't come up with something so simple before.
This commit is contained in:
Hugo Osvaldo Barrera 2021-03-02 22:50:00 +01:00
parent 53878f001a
commit 5ed9c821b8

View file

@ -23,14 +23,12 @@ def test_get_storage_init_args():
assert not required
def test_request_ssl(httpsserver):
httpsserver.serve_content('') # we need to serve something
def test_request_ssl():
with pytest.raises(requests.exceptions.ConnectionError) as excinfo:
http.request('GET', httpsserver.url)
http.request('GET', "https://self-signed.badssl.com/")
assert 'certificate verify failed' in str(excinfo.value)
http.request('GET', httpsserver.url, verify=False)
http.request('GET', "https://self-signed.badssl.com/", verify=False)
def _fingerprints_broken():