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

explicitly set the profile name to avoid random test errors #5932

Merged
merged 1 commit into from Apr 1, 2024

Conversation

escattone
Copy link
Contributor

@escattone escattone commented Mar 29, 2024

mozilla/sumo#1479

This PR fixes another random test-case failure. The UsernamesTests.test_query_old test case initiates a case-insensitive search for users whose username or profile.name starts with the letter a. In the setup for the test, a single user is created with an explicitly given username but a randomly generated profile.name. The test expects no users to be found, but since the profile.name is randomly generated, sometimes it's given a name that starts with the letter a, and the test fails. So the fix is simply to explicitly set the profile.name in the test setup.

I also took the opportunity to improve the quality of the UsernamesTests.test_query_current test case.

@akatsoulas akatsoulas merged commit 290e6ae into mozilla:main Apr 1, 2024
2 checks passed
@escattone escattone deleted the fix-users-api-test-case-1479 branch April 1, 2024 14:31
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.

None yet

2 participants