explicitly set the profile name to avoid random test errors #5932
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 whoseusername
orprofile.name
starts with the lettera
. In the setup for the test, a single user is created with an explicitly givenusername
but a randomly generatedprofile.name
. The test expects no users to be found, but since theprofile.name
is randomly generated, sometimes it's given a name that starts with the lettera
, and the test fails. So the fix is simply to explicitly set theprofile.name
in the test setup.I also took the opportunity to improve the quality of the
UsernamesTests.test_query_current
test case.