getsentry / responses

A utility for mocking out the Python Requests library.
Apache License 2.0
4.14k stars 354 forks source link

fix test compatibility with urllib3 #636

Closed beliaev-maksim closed 1 year ago

beliaev-maksim commented 1 year ago

closes #635 I thought more about the issue #635. Actually, we are back compatible.

urllib3 now enforces content length validation. Our lib proposes auto calculation of content length. However, if the user wants to provide a header and the header does not match actual content length, then user gets an error. Which is expected from the new urllib3

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (9428c2f) 100.00% compared to head (1eb0962) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #636 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 9 9 Lines 2858 2858 ========================================= Hits 2858 2858 ``` | [Impacted Files](https://app.codecov.io/gh/getsentry/responses/pull/636?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [responses/tests/test\_responses.py](https://app.codecov.io/gh/getsentry/responses/pull/636?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-cmVzcG9uc2VzL3Rlc3RzL3Rlc3RfcmVzcG9uc2VzLnB5) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.