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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user