chore(store): genericize email examples in docstring + test
Per CLAUDE.md vendor-agnostic OSS guidance — replace the real groupon.com email used as a sanitize_username() example with a placeholder (alice_smith@example.com).
This commit is contained in:
parent
5372d65b26
commit
537ea7662b
2 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ def sanitize_username(email: str) -> str:
|
||||||
replaces every run of non-``[a-z0-9-]`` characters with a single ``-``,
|
replaces every run of non-``[a-z0-9-]`` characters with a single ``-``,
|
||||||
collapses repeats, and trims leading/trailing dashes.
|
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("john.doe+claude@acme.com") -> "john-doe-claude"
|
||||||
sanitize_username("USER@example.com") -> "user"
|
sanitize_username("USER@example.com") -> "user"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ from src.store_naming import (
|
||||||
|
|
||||||
class TestSanitizeUsername:
|
class TestSanitizeUsername:
|
||||||
@pytest.mark.parametrize("email,expected", [
|
@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"),
|
("john.doe+claude@acme.com", "john-doe-claude"),
|
||||||
("USER@example.com", "user"),
|
("USER@example.com", "user"),
|
||||||
("a.b.c@x.y", "a-b-c"),
|
("a.b.c@x.y", "a-b-c"),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue