-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use sqlalchemy-utils PasswordType to store and hash user passwords
- Loading branch information
Showing
5 changed files
with
73 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,22 +28,24 @@ def test_user_get_from_login(testclient, user, backend): | |
|
||
|
||
def test_user_has_password(testclient, backend): | ||
u = models.User( | ||
user = models.User( | ||
formatted_name="Temp User", | ||
family_name="Temp", | ||
user_name="temp", | ||
emails=["[email protected]"], | ||
) | ||
u.save() | ||
user.save() | ||
|
||
assert not u.has_password() | ||
assert user.password is None | ||
assert not user.has_password() | ||
|
||
u.password = "foobar" | ||
u.save() | ||
user.password = "foobar" | ||
user.save() | ||
|
||
assert u.has_password() | ||
assert user.password is not None | ||
assert user.has_password() | ||
|
||
u.delete() | ||
user.delete() | ||
|
||
|
||
def test_user_set_and_check_password(testclient, user, backend): | ||
|