Skip to content

Commit

Permalink
Fix usage example with responses library to be compatible with reques…
Browse files Browse the repository at this point in the history
…ts 2.32
  • Loading branch information
JWCook committed Jun 3, 2024
1 parent 4dc0a52 commit f652475
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Fix `normalize_headers` not accepting header values in bytes
* Fix inconsistency due to rounding in `CachedResponse.expires_unix` property
* Fix form boundary used for cached multipart requests to _fully_ comply with RFC 2046
* Fix usage example with `responses` library to be compatible with `requests` 2.32

## 1.2.0 (2024-02-17)

Expand Down
4 changes: 3 additions & 1 deletion tests/compat/test_responses_load_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ def get_responses():

# responses patches HTTPAdapter.send(), so we need to patch one level lower to verify request mocking
@patch.object(
requests.adapters.HTTPAdapter, 'get_connection', side_effect=ValueError('Real request made!')
requests.adapters.HTTPAdapter,
'get_connection_with_tls_context',
side_effect=ValueError('Real request made!'),
)
def test_mock_session(mock_http_adapter):
"""Test that the mock_session fixture is working as expected"""
Expand Down

0 comments on commit f652475

Please sign in to comment.