TelegramAktienBot/api/tests/unit/test_helper_functions.py
2022-03-30 11:10:48 +02:00

21 lines
524 B
Python

"""
This file (test_helper_functions.py) contains the unit tests for the helper_functions.py file.
"""
from app.helper_functions import *
def test_hash_password():
"""
Test hash_password function
"""
assert hash_password("password") != "password"
def test_check_password():
"""
Test check_password function
"""
hashed = hash_password("password")
assert check_password(hashed, "password".encode("utf-8")) is True
assert check_password(hashed, "password1".encode("utf-8")) is False