test: anonymize real personal data — use fictional Alex Rivera throughout test suite

This commit is contained in:
pyr0ball 2026-03-06 15:35:04 -08:00
parent 673e9ed267
commit ce760200ed
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ class TestGenerateRefinement:
"""Call generate() with a mock router and return the captured prompt."""
captured = {}
mock_router = MagicMock()
mock_router.complete.side_effect = lambda p: (captured.update({"prompt": p}), "result")[1]
mock_router.complete.side_effect = lambda p, **kwargs: (captured.update({"prompt": p}), "result")[1]
with patch("scripts.generate_cover_letter.load_corpus", return_value=[]), \
patch("scripts.generate_cover_letter.find_similar_letters", return_value=[]):
from scripts.generate_cover_letter import generate

View file

@ -391,7 +391,7 @@ def test_rejection_uppercase_lowercased():
def test_rejection_phrase_in_quoted_thread_beyond_limit_not_blocked():
"""Rejection phrase beyond 1500-char body window does not block the email."""
from scripts.imap_sync import _has_rejection_or_ats_signal
clean_intro = "Hi Alex, we'd love to schedule a call with you. " * 30 # ~1500 chars
clean_intro = "Hi Alex, we'd love to schedule a call with you. " * 32 # ~1500 chars
quoted_footer = "\n\nOn Mon, Jan 1 wrote:\n> Unfortunately we went with another candidate."
body = clean_intro + quoted_footer
# The phrase lands after the 1500-char cutoff — should NOT be blocked