feat: 在测试中使用默认的 ToolContext,简化测试用例的上下文设置
This commit is contained in:
parent
4eb6193d0c
commit
a43023fce2
@ -234,6 +234,7 @@ mod tests {
|
|||||||
session_id: Some(format!("{}:chat-1", TEST_CHANNEL)),
|
session_id: Some(format!("{}:chat-1", TEST_CHANNEL)),
|
||||||
message_id: Some("msg-1".to_string()),
|
message_id: Some("msg-1".to_string()),
|
||||||
message_seq: Some(1),
|
message_seq: Some(1),
|
||||||
|
..ToolContext::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
let put = tool
|
let put = tool
|
||||||
|
|||||||
@ -236,6 +236,7 @@ mod tests {
|
|||||||
session_id: Some(format!("{}:chat-1", TEST_CHANNEL)),
|
session_id: Some(format!("{}:chat-1", TEST_CHANNEL)),
|
||||||
message_id: Some("msg-2".to_string()),
|
message_id: Some("msg-2".to_string()),
|
||||||
message_seq: Some(2),
|
message_seq: Some(2),
|
||||||
|
..ToolContext::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
let search = tool
|
let search = tool
|
||||||
|
|||||||
@ -672,6 +672,7 @@ mod tests {
|
|||||||
session_id: Some(format!("{}:oc_demo", TEST_CHANNEL)),
|
session_id: Some(format!("{}:oc_demo", TEST_CHANNEL)),
|
||||||
message_id: Some("msg-1".to_string()),
|
message_id: Some("msg-1".to_string()),
|
||||||
message_seq: Some(1),
|
message_seq: Some(1),
|
||||||
|
..Default::default()
|
||||||
},
|
},
|
||||||
json!({
|
json!({
|
||||||
"action": "put",
|
"action": "put",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user