13 lines
357 B
Python
13 lines
357 B
Python
import pytest
|
|
|
|
from app.core.password_policy import validate_password_strength
|
|
|
|
|
|
def test_password_policy_accepts_valid_password():
|
|
assert validate_password_strength("Valid123") == "Valid123"
|
|
|
|
|
|
def test_password_policy_rejects_weak_password():
|
|
with pytest.raises(ValueError, match="uppercase letter"):
|
|
validate_password_strength("valid123")
|