-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implementing test cases to POST and PATCH user models at the api/users endpoint #340
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
||
url = reverse("api-user-list") | ||
response = self.client.post(url, data=user, format="json") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
|
||
updated_data = {"name": "Johnn"} | ||
|
||
response = self.client.patch(url, data=updated_data, format="json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple, clean, and I approve!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Good to add tests for these, your code uses factories and is straightforward.
Thank you for your work.
This pull request is a step towards fortifying the User API endpoints with comprehensive tests, specifically targeting the POST and PATCH functionalities. The tests validate the reliability and correctness of these critical features, augmenting the overall stability and maintainability of Chigame. Key Contributions: |
Issue Score: Excellent |
This pull request addresses the need for testing of the User API endpoints, specifically focusing on the POST and PATCH functionalities. The introduced tests ensure the reliability and correctness of these critical features, contributing to the overall stability and maintainability of Chigame.