chore(backup): 保存新版预审开发前的代码与文档基线
verify / test-and-build (push) Canceled after 0s

This commit is contained in:
2026-09-28 16:34:10 +08:00
parent b10093f9d8
commit 4d5a420671
37 changed files with 3890 additions and 10 deletions
+5
View File
@@ -67,6 +67,11 @@ class RiskAgentTests(unittest.TestCase):
def test_model_never_calls_external_url(self):
with patch.dict("os.environ",{"XINGBANG_LOCAL_MODEL_URL":"https://example.com/v1"}):
with self.assertRaises(ValueError):engine.local_model({}, {}, {})
def test_official_deepseek_model_url_is_allowed(self):
with patch.dict("os.environ",{"XINGBANG_LOCAL_MODEL_URL":"https://api.deepseek.com"}), patch("graph.risk_task.invoke_risk_task",return_value={"text":"ok"}) as invoke:
result=engine.local_model({}, {}, {})
self.assertEqual(result,{"text":"ok"})
self.assertEqual(invoke.call_args.args[3],"https://api.deepseek.com")
def test_crud_custom_skill(self):
response=self.client.post(self.base+"/skills",json={"name":"新检查","data":{"engine":"quality","inputs":["*"],"output":"quality"}})
self.assertEqual(response.status_code,200,response.text)