add option to set user-password for service when updating its hash

This commit is contained in:
2021-09-05 15:40:03 +03:00
parent 08e0237639
commit 18de70154e
7 changed files with 45 additions and 22 deletions

View File

@ -26,7 +26,7 @@ def test_check_credentials_hash_password(user: User) -> None:
must generate and validate user password
"""
current_password = user.password
user.password = user.hash_password(current_password, "salt")
user.password = user.hash_password("salt")
assert user.check_credentials(current_password, "salt")
assert not user.check_credentials(current_password, "salt1")
assert not user.check_credentials(user.password, "salt")