fix(ai): 同步集成测试 create_prompt 签名 — 补充 analysis_type 参数
Prompt 管理 Phase 2 新增了 analysis_type 参数,但集成测试未同步。 5 处调用点全部补齐第 8 个参数。
This commit is contained in:
@@ -58,6 +58,7 @@ async fn prompt_create_and_get() {
|
|||||||
"Analyze: {{data}}".into(),
|
"Analyze: {{data}}".into(),
|
||||||
serde_json::json!({"model": "claude"}),
|
serde_json::json!({"model": "claude"}),
|
||||||
"analysis".into(),
|
"analysis".into(),
|
||||||
|
"lab_report".into(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("创建应成功");
|
.expect("创建应成功");
|
||||||
@@ -91,6 +92,7 @@ async fn prompt_list_with_category_filter() {
|
|||||||
"usr".into(),
|
"usr".into(),
|
||||||
serde_json::json!({}),
|
serde_json::json!({}),
|
||||||
cat.into(),
|
cat.into(),
|
||||||
|
"lab_report".into(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("创建应成功");
|
.expect("创建应成功");
|
||||||
@@ -128,6 +130,7 @@ async fn prompt_activate_switches_version() {
|
|||||||
"usr".into(),
|
"usr".into(),
|
||||||
serde_json::json!({}),
|
serde_json::json!({}),
|
||||||
"cat".into(),
|
"cat".into(),
|
||||||
|
"lab_report".into(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("v1");
|
.expect("v1");
|
||||||
@@ -187,6 +190,7 @@ async fn prompt_rollback_equals_activate() {
|
|||||||
"usr".into(),
|
"usr".into(),
|
||||||
serde_json::json!({}),
|
serde_json::json!({}),
|
||||||
"cat".into(),
|
"cat".into(),
|
||||||
|
"lab_report".into(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("v1");
|
.expect("v1");
|
||||||
@@ -236,6 +240,7 @@ async fn prompt_cross_tenant_isolation() {
|
|||||||
"usr".into(),
|
"usr".into(),
|
||||||
serde_json::json!({}),
|
serde_json::json!({}),
|
||||||
"cat".into(),
|
"cat".into(),
|
||||||
|
"lab_report".into(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("create");
|
.expect("create");
|
||||||
@@ -496,7 +501,7 @@ async fn analysis_list_with_filters() {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
// 按 patient 筛选
|
// 按 patient 筛选
|
||||||
let (items, total) = svc
|
let (_items, total) = svc
|
||||||
.list_analysis(
|
.list_analysis(
|
||||||
tenant_id,
|
tenant_id,
|
||||||
Some(patient_a),
|
Some(patient_a),
|
||||||
@@ -511,7 +516,7 @@ async fn analysis_list_with_filters() {
|
|||||||
assert_eq!(total, 2);
|
assert_eq!(total, 2);
|
||||||
|
|
||||||
// 按 type 筛选
|
// 按 type 筛选
|
||||||
let (items, total) = svc
|
let (_items, total) = svc
|
||||||
.list_analysis(
|
.list_analysis(
|
||||||
tenant_id,
|
tenant_id,
|
||||||
None,
|
None,
|
||||||
|
|||||||
Reference in New Issue
Block a user