Skip to content

Commit

Permalink
Change buffersize in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
perklet committed Nov 24, 2023
1 parent 68084d3 commit 72ff9be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unittest/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,15 @@ def test_stream_close_early(server):

def test_max_recv_speed(server):
s = requests.Session()
s.curl.setopt(CurlOpt.BUFFERSIZE, 1024 * 1024)
url = str(server.url.copy_with(path="/large"))
# from http://xcal1.vodafone.co.uk/
url = "http://212.183.159.230/200MB.zip"
start = time.time()
r = s.get(url, max_recv_speed=5 * 1024 * 1024)
r = s.get(url, max_recv_speed=10 * 1024 * 1024)
end = time.time()
# assert len(r.content) == 20 * 1024 * 1024
assert end - start > 30
assert end - start > 10


def test_curl_infos(server):
Expand Down

0 comments on commit 72ff9be

Please sign in to comment.