Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All help in providing PRs to close out bug issues is appreciated. Even if that i

- Unreleased
- Fix ``AttributeError: 'VCRFakeSocket' object has no attribute 'gettimeout'`` when niquests reuses a pooled connection, with urllib3-future 2.25.901 or later - thanks @pylaterreur
- Make the urllib3 POST test send its form fields again: since urllib3 2.0 it sent the dict as a chunked body, which the local httpbin server rejects, so the test failed now and then with ``BrokenPipeError`` - thanks @pylaterreur

- 8.3.0
- Add support for niquests (#980) - thanks @ionelmc
Expand Down
7 changes: 5 additions & 2 deletions tests/integration/test_urllib3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# coding=utf-8

import json

import pytest
import pytest_httpbin

Expand Down Expand Up @@ -101,11 +103,12 @@ def test_post(tmpdir, httpbin_both, verify_pool_mgr):
data = {"key1": "value1", "key2": "value2"}
url = httpbin_both.url + "/post"
with vcr.use_cassette(str(tmpdir.join("verify_pool_mgr.yaml"))):
req1 = verify_pool_mgr.request("POST", url, data).data
req1 = verify_pool_mgr.request("POST", url, fields=data).data

with vcr.use_cassette(str(tmpdir.join("verify_pool_mgr.yaml"))):
req2 = verify_pool_mgr.request("POST", url, data).data
req2 = verify_pool_mgr.request("POST", url, fields=data).data

assert json.loads(req1)["form"] == data
assert req1 == req2


Expand Down
Loading