list and save artifact/deployments tools hooked
This commit is contained in:
@@ -59,3 +59,31 @@ def test_file_store_round_trips_deployment(tmp_path) -> None:
|
||||
assert loaded.id == "summarize_docs.personal"
|
||||
assert loaded.artifact_id == "summarize_docs"
|
||||
assert loaded.bindings["context7"] == "context7.personal"
|
||||
|
||||
|
||||
def test_file_store_lists_deployments_in_id_order(tmp_path) -> None:
|
||||
store = FileWorkflowArtifactStore(tmp_path)
|
||||
store.save_deployment(
|
||||
WorkflowDeployment(
|
||||
id="summarize_docs.work",
|
||||
artifact_id="summarize_docs",
|
||||
artifact_version=1,
|
||||
bindings={"context7": "context7.work"},
|
||||
)
|
||||
)
|
||||
store.save_deployment(
|
||||
WorkflowDeployment(
|
||||
id="summarize_docs.personal",
|
||||
artifact_id="summarize_docs",
|
||||
artifact_version=1,
|
||||
bindings={"context7": "context7.personal"},
|
||||
)
|
||||
)
|
||||
|
||||
deployments = store.list_deployments()
|
||||
|
||||
assert [deployment.id for deployment in deployments] == [
|
||||
"summarize_docs.personal",
|
||||
"summarize_docs.work",
|
||||
]
|
||||
assert deployments[0].bindings["context7"] == "context7.personal"
|
||||
|
||||
Reference in New Issue
Block a user