Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Oct 31, 2024
1 parent 74731da commit 91c9f76
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/downloads_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,13 @@ def test_fetch():
assert _send_pycurl_request(*args) is None

# test MAX_FILE_SIZE
this_config = DEFAULT_CONFIG
this_config.set('DEFAULT', 'MAX_FILE_SIZE', '1')
args = ('https://httpbun.com/html', True, False, this_config)
backup = ZERO_CONFIG.getint('DEFAULT', 'MAX_FILE_SIZE')
ZERO_CONFIG.set('DEFAULT', 'MAX_FILE_SIZE', '1')
args = ('https://httpbun.com/html', True, False, ZERO_CONFIG)
assert _send_urllib_request(*args) is None
if HAS_PYCURL:
assert _send_pycurl_request(*args) is None
ZERO_CONFIG.set('DEFAULT', 'MAX_FILE_SIZE', str(backup))

# reset global objects again to avoid affecting other tests
_reset_downloads_global_objects()
Expand Down

0 comments on commit 91c9f76

Please sign in to comment.