Files
ThothII/harness/tests/test_manifest_pi_fields.py

20 lines
956 B
Python

from tht.session.models import SessionManifest
from tht.session.store import create_session
def test_manifest_persists_pi_fields(tmp_path):
from tht.config import DatabaseConfig
db = DatabaseConfig(database="d", schema="s", transport="rest", user="u", password="p")
m = create_session("q", db, tmp_path, provider="zai", model="glm-5.2",
thinking="medium", name="sessione test")
reload = SessionManifest.from_yaml(tmp_path / m.id / "session_manifest.yaml")
assert reload.provider == "zai" and reload.model == "glm-5.2"
assert reload.thinking == "medium" and reload.name == "sessione test"
def test_manifest_pi_fields_optional(tmp_path):
from tht.config import DatabaseConfig
db = DatabaseConfig(database="d", schema="s", transport="rest", user="u", password="p")
m = create_session("q", db, tmp_path)
assert m.provider is None and m.model is None and m.thinking is None and m.name is None