大模型速度增加提示
This commit is contained in:
1 parent
4e764350a4
commit
3ea33e1dee
52 files changed
+4673
-176
No files matched your search
@@ -147,13 +147,23 @@ async def test_subscriber_can_read_runs_and_get_run(store):
|
||||
)
|
||||
assert run is not None
|
||||
|
||||
alice_runs = await service.list_runs("alice", "t1", limit=10)
|
||||
assert alice_runs[0]["can_edit"] is True
|
||||
|
||||
# Bob (subscriber) sees runs on the task.
|
||||
bob_runs = await service.list_runs("bob", "t1", limit=10)
|
||||
assert [r["id"] for r in bob_runs] == ["run-1"]
|
||||
assert bob_runs[0]["can_edit"] is False
|
||||
|
||||
# Bob can fetch the run by id.
|
||||
fetched = await service.get_run("bob", "run-1")
|
||||
assert fetched is not None and fetched["id"] == "run-1"
|
||||
assert fetched["can_edit"] is False
|
||||
|
||||
# Bob can read subscribed records, but cannot delete Alice's record.
|
||||
with pytest.raises(PermissionError):
|
||||
await service.delete_run("bob", "run-1")
|
||||
assert await store.get_run("run-1", "alice") is not None
|
||||
|
||||
# Carol (no subscription) cannot.
|
||||
assert await service.list_runs("carol", "t1", limit=10) == []
|
||||
|
||||
Reference in new issue
Block a user