Skip to content

feat: implemeting user finder tests#4

Merged
lucaspaiva-lp merged 3 commits intomainfrom
develop
Jan 31, 2026
Merged

feat: implemeting user finder tests#4
lucaspaiva-lp merged 3 commits intomainfrom
develop

Conversation

@lucaspaiva-lp
Copy link
Owner

Description

This PR fixes multiple issues in the user management and testing modules. It ensures that:

  • Exception messages are grammatically correct and consistent ("User is not registered!").
  • Unit tests correctly mock repository behavior without breaking logic.
  • Tests for UserCreator and UserFinder now properly assert expected responses.
  • pytest.raises assertions use .value to access exception messages, resolving ExceptionInfo comparison errors.
  • Internal mocks track attributes correctly for assertion checks.

Why

These changes improve test reliability, maintain code consistency, and allow the system to be safely extended for future business logic without introducing test flakiness.

Notes

  • No business logic was altered.
  • Tests now fully reflect the intended behavior of the repository-controller interaction.
  • This PR aligns with the project's clean code principles and layered MVC architecture.

@lucaspaiva-lp lucaspaiva-lp self-assigned this Jan 31, 2026
@lucaspaiva-lp lucaspaiva-lp added bug Something isn't working enhancement New feature or request labels Jan 31, 2026
@lucaspaiva-lp lucaspaiva-lp merged commit 049aa7b into main Jan 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant