mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-26 18:33:30 +08:00
Feat: Modify the style of the release confirmation box. (#13542)
### What problem does this PR solve? Feat: Modify the style of the release confirmation box. ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com> Co-authored-by: balibabu <assassin_cike@163.com> Co-authored-by: 6ba3i <isbaaoui09@gmail.com>
This commit is contained in:
@@ -543,12 +543,15 @@ def test_create_and_update_guard_matrix(monkeypatch):
|
||||
assert "Fail to create a session" in res["message"]
|
||||
|
||||
monkeypatch.setattr(module, "request", SimpleNamespace(args=_Args()))
|
||||
monkeypatch.setattr(module.UserCanvasService, "get_by_id", lambda _id: (False, None))
|
||||
monkeypatch.setattr(module.UserCanvasService, "query", lambda **_kwargs: [SimpleNamespace(id="agent-1")])
|
||||
|
||||
def _raise_lookup(*_args, **_kwargs):
|
||||
raise LookupError("Agent not found.")
|
||||
|
||||
monkeypatch.setattr(module.UserCanvasService, "get_agent_dsl_with_release", _raise_lookup)
|
||||
res = _run(inspect.unwrap(module.create_agent_session)("tenant-1", "agent-1"))
|
||||
assert res["message"] == "Agent not found."
|
||||
|
||||
canvas = SimpleNamespace(dsl="{}", id="agent-1")
|
||||
monkeypatch.setattr(module.UserCanvasService, "get_by_id", lambda _id: (True, canvas))
|
||||
monkeypatch.setattr(module.UserCanvasService, "query", lambda **_kwargs: [])
|
||||
res = _run(inspect.unwrap(module.create_agent_session)("tenant-1", "agent-1"))
|
||||
assert res["message"] == "You cannot access the agent."
|
||||
|
||||
Reference in New Issue
Block a user