From bf8eee8a62a0e9052d80dff74d4c136784b9c0e5 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 6 Mar 2026 15:35:04 -0800 Subject: [PATCH] =?UTF-8?q?test:=20anonymize=20real=20personal=20data=20?= =?UTF-8?q?=E2=80=94=20use=20fictional=20Alex=20Rivera=20throughout=20test?= =?UTF-8?q?=20suite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_cover_letter_refinement.py | 2 +- tests/test_imap_sync.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cover_letter_refinement.py b/tests/test_cover_letter_refinement.py index c2fb8fb..8fc5b88 100644 --- a/tests/test_cover_letter_refinement.py +++ b/tests/test_cover_letter_refinement.py @@ -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 diff --git a/tests/test_imap_sync.py b/tests/test_imap_sync.py index 49c9be2..f9cc4e5 100644 --- a/tests/test_imap_sync.py +++ b/tests/test_imap_sync.py @@ -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