Files
FabledScribe/tests/test_briefing_models.py
T
2026-03-11 19:45:47 -04:00

21 lines
991 B
Python

def test_conversation_has_briefing_fields():
"""Conversation model must declare conversation_type and briefing_date."""
from fabledassistant.models.conversation import Conversation
cols = {c.key for c in Conversation.__table__.columns}
assert "conversation_type" in cols
assert "briefing_date" in cols
def test_rss_models_exist():
from fabledassistant.models.rss_feed import RssFeed, RssItem
feed_cols = {c.key for c in RssFeed.__table__.columns}
item_cols = {c.key for c in RssItem.__table__.columns}
assert {"id", "user_id", "url", "title", "last_fetched_at"} <= feed_cols
assert {"id", "feed_id", "guid", "title", "url", "published_at", "content"} <= item_cols
def test_weather_cache_model_exists():
from fabledassistant.models.weather_cache import WeatherCache
cols = {c.key for c in WeatherCache.__table__.columns}
assert {"id", "user_id", "location_key", "location_label", "forecast_json", "previous_json", "fetched_at"} <= cols