MCPcopy
hub / github.com/lss233/kirara-ai / test_list_backends

Method test_list_backends

tests/web/api/llm/test_llm.py:123–135  ·  view source on GitHub ↗

测试获取后端列表

(self, test_client, auth_headers)

Source from the content-addressed store, hash-verified

121
122 @pytest.mark.asyncio
123 async def test_list_backends(self, test_client, auth_headers):
124 """测试获取后端列表"""
125 response = test_client.get(
126 "/backend-api/api/llm/backends", headers=auth_headers
127 )
128
129 data = response.json()
130 assert "data" in data
131 assert "backends" in data.get("data")
132 backends = data.get("data").get("backends")
133 assert len(backends) == 1
134 assert backends[0].get("name") == TEST_BACKEND_NAME
135 assert backends[0].get("adapter") == TEST_ADAPTER_TYPE
136
137 @pytest.mark.asyncio
138 async def test_get_backend(self, test_client, auth_headers):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected