mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Attempt to fix requests tests
This commit is contained in:
parent
9bba4bb9fe
commit
547b327557
1 changed files with 3 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ def test_get_storage_init_args():
|
|||
def test_request_ssl(httpsserver):
|
||||
httpsserver.serve_content('') # we need to serve something
|
||||
|
||||
with pytest.raises(requests.exceptions.SSLError) as excinfo:
|
||||
with pytest.raises(requests.exceptions.ConnectionError) as excinfo:
|
||||
http.request('GET', httpsserver.url)
|
||||
assert 'certificate verify failed' in str(excinfo.value)
|
||||
|
||||
|
|
@ -52,11 +52,11 @@ def test_request_ssl_fingerprints(httpsserver, fingerprint):
|
|||
|
||||
http.request('GET', httpsserver.url, verify=False,
|
||||
verify_fingerprint=fingerprint)
|
||||
with pytest.raises(requests.exceptions.SSLError) as excinfo:
|
||||
with pytest.raises(requests.exceptions.ConnectionError) as excinfo:
|
||||
http.request('GET', httpsserver.url,
|
||||
verify_fingerprint=fingerprint)
|
||||
|
||||
with pytest.raises(requests.exceptions.SSLError) as excinfo:
|
||||
with pytest.raises(requests.exceptions.ConnectionError) as excinfo:
|
||||
http.request('GET', httpsserver.url, verify=False,
|
||||
verify_fingerprint=''.join(reversed(fingerprint)))
|
||||
assert 'Fingerprints did not match' in str(excinfo.value)
|
||||
|
|
|
|||
Loading…
Reference in a new issue