From c2d81e04b9772a2dc7ffe15c7847be67ed2e7d7d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 30 Mar 2026 17:42:48 -0400 Subject: [PATCH] fix: update tests for briefing rewrite and raised content cap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove test_slot_greeting — slot_greeting() was removed in the conversational briefing rewrite - Update test_extract_item_truncates_content to use CONTENT_MAX_CHARS rather than a hardcoded 2000 (cap raised to 50000 for full articles) Co-Authored-By: Claude Sonnet 4.6 --- tests/test_briefing_pipeline.py | 7 ------- tests/test_rss_service.py | 8 ++++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/test_briefing_pipeline.py b/tests/test_briefing_pipeline.py index c1f725f..3eee711 100644 --- a/tests/test_briefing_pipeline.py +++ b/tests/test_briefing_pipeline.py @@ -21,13 +21,6 @@ def test_format_task_for_briefing(): assert "in_progress" in result or "In Progress" in result -def test_slot_greeting(): - """slot_greeting() should return different strings for different slot names.""" - from fabledassistant.services.briefing_pipeline import slot_greeting - assert "morning" in slot_greeting("compilation").lower() or slot_greeting("compilation") - assert slot_greeting("morning") != slot_greeting("midday") - assert slot_greeting("midday") != slot_greeting("afternoon") - def test_compute_task_snapshot_hash(): """compute_task_hash should return a stable SHA-256 hex string.""" diff --git a/tests/test_rss_service.py b/tests/test_rss_service.py index a18a4ed..29905b9 100644 --- a/tests/test_rss_service.py +++ b/tests/test_rss_service.py @@ -17,13 +17,13 @@ def test_extract_item_fields(): def test_extract_item_truncates_content(): - """extract_item() should truncate content to 2000 chars.""" - from fabledassistant.services.rss import extract_item + """extract_item() should truncate content to CONTENT_MAX_CHARS.""" + from fabledassistant.services.rss import extract_item, CONTENT_MAX_CHARS entry = MagicMock() - entry.get = lambda k, d="": {"summary": "x" * 3000, "title": "", "link": "", "id": "g"}.get(k, d) + entry.get = lambda k, d="": {"summary": "x" * (CONTENT_MAX_CHARS + 1000), "title": "", "link": "", "id": "g"}.get(k, d) entry.published_parsed = None item = extract_item(entry) - assert len(item["content"]) == 2000 + assert len(item["content"]) == CONTENT_MAX_CHARS def test_extract_item_prefers_content_over_summary():