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

#Issue1133 : Expand PasswordResetSerializer for backend #1151

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

narmadha-raghu
Copy link

@narmadha-raghu narmadha-raghu commented Mar 9, 2025

Contributor checklist

PFA

Screenshot 2025-03-09 at 23 56 30

Description

This pull request improves test coverage in backend/authentication/serializers.py, specifically addressing the missing lines 111-114 in the PasswordResetSerializer. I have added test cases to ensure these lines are covered.

Changes :

  • Added missing tests for PasswordResetSerializer to achieve full coverage.
  • Ensured proper validation and error handling are tested.

Testing :

  • Verified that all tests pass successfully.

I followed this resource, as suggested by @andrewtavis, to refine the test implementation for DRF serializers.

Copy link

netlify bot commented Mar 9, 2025

Deploy Preview for activist-org canceled.

Name Link
🔨 Latest commit 01d5bda
🔍 Latest deploy log https://app.netlify.com/sites/activist-org/deploys/67cde339b3a03e0008564786

Copy link
Contributor

github-actions bot commented Mar 9, 2025

Thank you for the pull request! ❤️

The activist team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Development rooms once you're in. Also consider attending our bi-weekly Saturday developer syncs! It'd be great to meet you 😊

Copy link
Contributor

github-actions bot commented Mar 9, 2025

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • The TypeScript, pytest and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)

  • The changelog has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

First PR Commit Check

  • The commit messages for the remote branch of a new contributor should be checked to make sure their email is set up correctly so that they receive credit for their contribution
    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local activist repo (can be set with git config --global user.email "GITHUB_EMAIL")

@andrewtavis andrewtavis self-requested a review March 9, 2025 20:16
@andrewtavis andrewtavis requested a review from to-sta March 9, 2025 20:18
@andrewtavis
Copy link
Member

Thanks for the PR, @narmadha-raghu! We'll try to get to this in the coming days :)

CC @to-sta for oversight here. The method resources that I provided was this blog post, which may also then be used in other Serializers so we're consistent.

@narmadha-raghu
Copy link
Author

Hi @andrewtavis,

I also have another question—would it be a good idea to split the tests within authentication for better organization?

For example, we could structure them under a tests/ folder, separating them into files like:

  • test_auth.py (for authentication-related tests)
  • test_serializer.py (for serializer-specific tests)

This would make the implementation clearer and more maintainable. Let me know your thoughts! 🚀

@andrewtavis
Copy link
Member

That sounds amazing to me, @narmadha-raghu! Feel free to send along this refactor and then we'll get to the review :)

@andrewtavis
Copy link
Member

Thanks for the great initiative! 😊

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