14 lines
333 B
Python
14 lines
333 B
Python
from __future__ import annotations
|
|
|
|
import secrets
|
|
|
|
|
|
def random_password() -> str:
|
|
"""Return a strong test password that satisfies complexity checks."""
|
|
return f"Aa1!{secrets.token_urlsafe(16)}"
|
|
|
|
|
|
def random_token() -> str:
|
|
"""Return a random token suitable for test session data."""
|
|
return secrets.token_urlsafe(24)
|