# Path: app/main/encryption.py
# def checkpw(password, hashed_password):
#     return check_password_hash(hashed_password, password)
# 
# def hashpw(password):
#     return generate_password_hash(password, 10)


from app.main.encryption import checkpw, hashpw


def test_should_hash_password():
    password = "mypassword"
    assert password != hashpw(password)


def test_should_check_password():
    password = "mypassword"
    password_hash = hashpw(password)
    assert checkpw(password, password_hash) is True


def test_should_check_invalid_password():
    password = "mypassword"
    password_hash = hashpw(password)

# Path: app/main/encryption.py
# def checkpw(password, hashed_password):
#     return check_password_hash(hashed_password, password)
# 
# def hashpw(password):
#     return generate_password_hash(password, 10)


# Path: tests/test_encryption.py
from app.main.encryption import checkpw, hashpw



def test_should_hash_password():
    password = "mypassword"
    assert password != hashpw(password)


def test_should_check_password():
    password = "mypassword"
    password_hash = hashpw(password)
    assert checkpw(password, password_hash) is True


def test_should_check_invalid_password():
    password = "mypassword"
    password_hash = hashpw(password)

    assert checkpw("not my password", password_hash) is False