chore: import upstream snapshot with attribution
Ruff Format Check / Ruff Format & Lint (push) Failing after 7m39s
Deploy VitePress site to Pages / build (push) Failing after 9m11s
Deploy VitePress site to Pages / Deploy (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:32:26 +08:00
commit 1443d3fdf9
732 changed files with 196602 additions and 0 deletions
@@ -0,0 +1,21 @@
from __future__ import annotations
from types import SimpleNamespace
import pytest
import yuxi.agents.backends.knowledge_base_backend as knowledge_base_backend
@pytest.mark.asyncio
async def test_resolve_visible_knowledge_bases_requires_slug(monkeypatch):
async def fake_get_databases_by_uid(_uid):
return {"databases": [{"id": "legacy-id", "name": "Legacy"}]}
monkeypatch.setattr(knowledge_base_backend.knowledge_base, "get_databases_by_uid", fake_get_databases_by_uid)
context = SimpleNamespace(uid="u1", knowledges=["legacy-id"])
databases = await knowledge_base_backend.resolve_visible_knowledge_bases_for_context(context)
assert databases == []