Skip to content

Drop private import of 'encode_request' in test_multipart - #2525

Merged
lovelydinosaur merged 3 commits into
masterfrom
drop-private-import-in-test-multipart
Jan 10, 2023
Merged

Drop private import of 'encode_request' in test_multipart#2525
lovelydinosaur merged 3 commits into
masterfrom
drop-private-import-in-test-multipart

Conversation

@lovelydinosaur

@lovelydinosaurlovelydinosaur commented Dec 31, 2022

Copy link
Copy Markdown
Contributor

Refs #2492

This is just a test refactoring.

Use httpx.Request(...) to handle the multipart tests, rather than importing the encode_request function, which is a private implementation detail. Having tests against our public API makes more sense than digging into private imports.

@lovelydinosaurlovelydinosaur added the refactor Issues and PRs related to code refactoring label Jan 4, 2023
@lovelydinosaur
lovelydinosaur requested a review from a teamJanuary 10, 2023 11:18

@michaeloliverxmichaeloliverx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to dog food the public API.

@lovelydinosaur
lovelydinosaur merged commit 7947b56 into masterJan 10, 2023
@lovelydinosaur
lovelydinosaur deleted the drop-private-import-in-test-multipart branch January 10, 2023 11:23
@lovelydinosaurlovelydinosaur mentioned this pull request Apr 6, 2023
samclearman pushed a commit to titanmsp/httpx that referenced this pull request Apr 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactorIssues and PRs related to code refactoring

Development

Successfully merging this pull request may close these issues.

2 participants

@lovelydinosaur@michaeloliverx