Skip to content

Commit

Permalink
tests: check existing username case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ptamarit authored and slint committed Mar 27, 2024
1 parent 29d0b5b commit 1794934
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ def test_profile_name_exists(app):
profile_url,
data=prefix(
"profile",
dict(username="existingname", full_name="Valid Name", affiliations=""),
dict(username="ExistingName", full_name="Valid Name", affiliations=""),
),
)
assert error_msg not in resp.get_data(as_text=True)

# Create another user and try setting username to same as above user.
# Create another user and try setting username to same as above user with a different case.
with app.test_client() as client:
sign_up(app, client)
login(app, client)
Expand All @@ -197,7 +197,7 @@ def test_profile_name_exists(app):
data=prefix(
"profile",
dict(
username="existingname", full_name="Another name", affiliations=""
username="eXISTINGnAME", full_name="Another name", affiliations=""
),
),
follow_redirects=True,
Expand Down

0 comments on commit 1794934

Please sign in to comment.