fix: update tests for briefing rewrite and raised content cap

- 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 <noreply@anthropic.com>
This commit is contained in:
2026-03-30 17:42:48 -04:00
parent e613485474
commit c2d81e04b9
2 changed files with 4 additions and 11 deletions
-7
View File
@@ -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."""
+4 -4
View File
@@ -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():