mirror of
https://github.com/Xevion/linkpulse.git
synced 2026-01-31 04:24:46 -06:00
Switch test_user user fixture to proper hasher
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
import structlog
|
||||||
from linkpulse.models import User
|
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
|
@pytest.fixture
|
||||||
def user():
|
def user():
|
||||||
return User.create(
|
return User.create(
|
||||||
email=random_email(), password_hash=str(epoch()) + random_string(64)
|
email=random_email(), password_hash=hasher.hash(random_string(64))
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user