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

Refs #21442 -- Increased test coverage of requests. #17531

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

smithdc1
Copy link
Member

This PR improves test coverage for requests. It includes additional coverage for some missing lines and also aims to test additional scenarios for request.POST. I can split these out if that would be helpful.

The additional request.POST scenarios include:

  • Data being provided for other methods other than POST.
  • CONTENT_TYPE = application/json
  • Mutipart with JSON,
  • Multipart with JSON + name/value,
  • Multipart with JSON + name/value + CSV,
  • Multipart with JSON + name/value + FILE

@carltongibson -- did you have any other scenarios on your list 📓

Copy link
Member

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

Hey @smithdc1 — this looks great.

I think it captures everything we need for regression test purposes.

Maybe I have an example or two that we might want to look at when adding support for other content types but I don't think they're any different in structure from the ones you have for capturing the existing behaviour. (≈_You get a string_ 😜)

@smithdc1 smithdc1 marked this pull request as ready for review November 27, 2023 17:25
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

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

@smithdc1 Thanks 👍

I pushed tiny edits.

@felixxm felixxm changed the title Refs #21442 -- Improved requests test coverage Refs #21442 -- Increased test coverage of requests. Nov 28, 2023
@felixxm felixxm merged commit 76280b4 into django:main Nov 28, 2023
33 checks passed
@smithdc1 smithdc1 deleted the ticket_21442 branch November 28, 2023 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants