fix(tests): add endpoint URLs to remaining session fixtures

This commit is contained in:
Alexandre Teixeira
2026-06-04 03:14:43 +01:00
committed by GitHub
parent eac354629a
commit be8f1fac85
2 changed files with 9 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ def _make_session(sid, owner="alice"):
db = _TS()
try:
db.add(DbSession(id=sid, owner=owner, name="chat", model="gpt-4o",
endpoint_url="http://localhost:11434",
archived=False, message_count=1))
db.commit()
finally:

View File

@@ -36,7 +36,14 @@ def test_rewrite_query_selects_and_updates_latest_assistant_message():
base = datetime(2026, 6, 3, 12, 0, 0)
db = TS()
try:
db.add(DbSession(id=sid, owner="alice", name="c", model="m", archived=False))
db.add(DbSession(
id=sid,
owner="alice",
name="c",
model="m",
endpoint_url="http://localhost:11434",
archived=False,
))
db.add(DBChatMessage(id="m1", session_id=sid, role="assistant", content="old first", timestamp=base))
db.add(DBChatMessage(id="m2", session_id=sid, role="assistant", content="old latest", timestamp=base + timedelta(minutes=1)))
db.commit()