diff --git a/src/store_naming.py b/src/store_naming.py index ce8bfcb..05d6601 100644 --- a/src/store_naming.py +++ b/src/store_naming.py @@ -30,7 +30,7 @@ def sanitize_username(email: str) -> str: replaces every run of non-``[a-z0-9-]`` characters with a single ``-``, collapses repeats, and trims leading/trailing dashes. - sanitize_username("c_marustamyan@groupon.com") -> "c-marustamyan" + sanitize_username("alice_smith@example.com") -> "alice-smith" sanitize_username("john.doe+claude@acme.com") -> "john-doe-claude" sanitize_username("USER@example.com") -> "user" diff --git a/tests/test_store_naming.py b/tests/test_store_naming.py index 5357e03..3cc2d66 100644 --- a/tests/test_store_naming.py +++ b/tests/test_store_naming.py @@ -15,7 +15,7 @@ from src.store_naming import ( class TestSanitizeUsername: @pytest.mark.parametrize("email,expected", [ - ("c_marustamyan@groupon.com", "c-marustamyan"), + ("alice_smith@example.com", "alice-smith"), ("john.doe+claude@acme.com", "john-doe-claude"), ("USER@example.com", "user"), ("a.b.c@x.y", "a-b-c"),