feat: pin sessions to workspace revisions
This commit is contained in:
@@ -7,7 +7,7 @@ from typer.testing import CliRunner
|
||||
from tht.config import DatabaseConfig
|
||||
from tht.decisions import DecisionRecord
|
||||
from tht.session.models import SessionSnapshot
|
||||
from tht.session.store import build_documents, build_snapshot_documents, create_session
|
||||
from tht.session.store import build_documents, build_snapshot_documents, create_session, new_session_manifest
|
||||
from tht.cli.session_cmd import session_app
|
||||
|
||||
|
||||
@@ -18,6 +18,15 @@ def _db():
|
||||
)
|
||||
|
||||
|
||||
def test_manifest_persists_workspace_revision():
|
||||
manifest = new_session_manifest(
|
||||
"q", _db(), workspace_id="psd-clinical", workspace_revision="a" * 40
|
||||
)
|
||||
|
||||
assert manifest.workspace_id == "psd-clinical"
|
||||
assert manifest.workspace_revision == "a" * 40
|
||||
|
||||
|
||||
def test_build_documents_always_has_original_question(tmp_path):
|
||||
m = create_session("quante ablazioni nel 2024", _db(), tmp_path)
|
||||
docs = build_documents(m, tmp_path / m.id)
|
||||
|
||||
Reference in New Issue
Block a user