Files
core/tests/auth/test_identity.py
Untone b60a314ddd
Some checks failed
Deploy on push / deploy (push) Failing after 5s
tested-auth-refactoring
2025-07-25 01:04:15 +03:00

14 lines
478 B
Python

import pytest
from auth.identity import Password
def test_password_verify():
# Создаем пароль
original_password = "test_password123"
hashed_password = Password.encode(original_password)
# Проверяем корректный пароль
assert Password.verify(original_password, hashed_password) is True
# Проверяем некорректный пароль
assert Password.verify("wrong_password", hashed_password) is False