Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIRequestor: don't mutate incoming multipart headers #1091

Merged
merged 4 commits into from
Oct 18, 2023

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Oct 18, 2023

Pulled out from #1088 since it's a behavior change.

Also fixes the file tests. Unfortunately the special multipart form behavior is implemented in api_requestor, but our mocks mock at the api_requestor level so in order to actually make assertions about multipart you have to mock at the http_client level.

These tests were accidentally working because of the unintended mutation. Stopping the mutation broke them, but required the tests to change.

FileUpload is an alias for File, so I deleted file_upload_test.py as it's basically completely redundant.

@richardm-stripe richardm-stripe enabled auto-merge (squash) October 18, 2023 21:55
@richardm-stripe richardm-stripe merged commit eadc1bb into master Oct 18, 2023
10 checks passed
@richardm-stripe richardm-stripe deleted the richardm-dont-mutate-multipart-headers branch October 18, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants