test: anonymize real personal data — use fictional Alex Rivera throughout test suite
This commit is contained in:
parent
d3f86f2143
commit
bf8eee8a62
2 changed files with 2 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ class TestGenerateRefinement:
|
||||||
"""Call generate() with a mock router and return the captured prompt."""
|
"""Call generate() with a mock router and return the captured prompt."""
|
||||||
captured = {}
|
captured = {}
|
||||||
mock_router = MagicMock()
|
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=[]), \
|
with patch("scripts.generate_cover_letter.load_corpus", return_value=[]), \
|
||||||
patch("scripts.generate_cover_letter.find_similar_letters", return_value=[]):
|
patch("scripts.generate_cover_letter.find_similar_letters", return_value=[]):
|
||||||
from scripts.generate_cover_letter import generate
|
from scripts.generate_cover_letter import generate
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,7 @@ def test_rejection_uppercase_lowercased():
|
||||||
def test_rejection_phrase_in_quoted_thread_beyond_limit_not_blocked():
|
def test_rejection_phrase_in_quoted_thread_beyond_limit_not_blocked():
|
||||||
"""Rejection phrase beyond 1500-char body window does not block the email."""
|
"""Rejection phrase beyond 1500-char body window does not block the email."""
|
||||||
from scripts.imap_sync import _has_rejection_or_ats_signal
|
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."
|
quoted_footer = "\n\nOn Mon, Jan 1 wrote:\n> Unfortunately we went with another candidate."
|
||||||
body = clean_intro + quoted_footer
|
body = clean_intro + quoted_footer
|
||||||
# The phrase lands after the 1500-char cutoff — should NOT be blocked
|
# The phrase lands after the 1500-char cutoff — should NOT be blocked
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue