Switch test_user user fixture to proper hasher

This commit is contained in:
2024-11-09 22:44:57 -06:00
parent a4c8336c1a
commit ee4f3c64d9

View File

@@ -1,10 +1,14 @@
import pytest
import structlog
from linkpulse.models import User
from linkpulse.tests.random import epoch, random_email, random_string
from linkpulse.routers.auth import hasher
from linkpulse.tests.random import random_email, random_string
logger = structlog.get_logger()
@pytest.fixture
def user():
return User.create(
email=random_email(), password_hash=str(epoch()) + random_string(64)
email=random_email(), password_hash=hasher.hash(random_string(64))
)