second round of review
This commit is contained in:
parent
da5a0d03eb
commit
ca55932a41
10 changed files with 124 additions and 229 deletions
7
backend/tests/helpers.py
Normal file
7
backend/tests/helpers.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import uuid
|
||||
|
||||
|
||||
def unique_email(prefix: str = "test") -> str:
|
||||
"""Generate a unique email for tests sharing the same database."""
|
||||
return f"{prefix}-{uuid.uuid4().hex[:8]}@example.com"
|
||||
|
||||
|
|
@ -1,12 +1,7 @@
|
|||
import pytest
|
||||
import uuid
|
||||
|
||||
from auth import COOKIE_NAME
|
||||
|
||||
|
||||
def unique_email(prefix: str = "test") -> str:
|
||||
"""Generate a unique email for tests sharing the same database."""
|
||||
return f"{prefix}-{uuid.uuid4().hex[:8]}@example.com"
|
||||
from tests.helpers import unique_email
|
||||
|
||||
|
||||
# Registration tests
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
import pytest
|
||||
import uuid
|
||||
|
||||
from auth import COOKIE_NAME
|
||||
|
||||
|
||||
def unique_email(prefix: str = "counter") -> str:
|
||||
"""Generate a unique email for tests sharing the same database."""
|
||||
return f"{prefix}-{uuid.uuid4().hex[:8]}@example.com"
|
||||
from tests.helpers import unique_email
|
||||
|
||||
|
||||
# Protected endpoint tests - without auth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue