Skip to content

Commit

Permalink
tests: fix user attribute cardinalities
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Nov 22, 2023
1 parent e504c73 commit fd8a5ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/core/test_profile_edition.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def test_edition_remove_fields(
assert not logged_user.display_name
assert not logged_user.phone_numbers

logged_user.formatted_name = ["John (johnny) Doe"]
logged_user.family_name = ["Doe"]
logged_user.formatted_name = "John (johnny) Doe"
logged_user.family_name = "Doe"
logged_user.emails = ["[email protected]"]
logged_user.given_name = None
logged_user.photo = None
Expand Down Expand Up @@ -323,7 +323,7 @@ def test_bad_email(testclient, logged_user):
def test_surname_is_mandatory(testclient, logged_user):
res = testclient.get("/profile/user", status=200)
form = res.forms["baseform"]
logged_user.family_name = ["Doe"]
logged_user.family_name = "Doe"

form["family_name"] = ""

Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_profile_photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def test_photo(testclient, user, jpeg_photo):
user.photo = [jpeg_photo]
user.photo = jpeg_photo
user.save()
user.reload()

Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_profile_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def test_password_initialization_mail(smtpd, testclient, backend, logged_admin):
assert smtpd.messages[0]["X-RcptTo"] == "[email protected]"

u.reload()
u.password = ["correct horse battery staple"]
u.password = "correct horse battery staple"
u.save()

res = testclient.get("/profile/temp/settings", status=200)
Expand Down

0 comments on commit fd8a5ac

Please sign in to comment.