Skip to content

Commit

Permalink
test no_ssl True & False to fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarbaresi committed Dec 31, 2023
1 parent ba1fc80 commit a023195
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/downloads_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ def test_fetch():
assert _send_pycurl_request('https://expired.badssl.com/', False, DEFAULT_CONFIG) is not None
# no SSL, no decoding
url = 'https://httpbun.com/status/200'
response = _send_request('https://httpbun.com/status/200', True, DEFAULT_CONFIG)
assert response.data == b''
for no_ssl in (True, False):
response = _send_request('https://httpbun.com/status/200', no_ssl, DEFAULT_CONFIG)
assert response.data == b''
if pycurl is not None:
response1 = _send_pycurl_request('https://httpbun.com/status/200', True, DEFAULT_CONFIG)
assert _handle_response(url, response1, False, DEFAULT_CONFIG) == _handle_response(url, response, False, DEFAULT_CONFIG)
Expand Down

0 comments on commit a023195

Please sign in to comment.