Skip to content

Commit 973ddad

Browse files
authored
fix unittest (#3328)
1 parent f27e879 commit 973ddad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/ce/server/test_evil_cases.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ def test_stop_seq_exceed_num():
106106
}
107107
payload = build_request_payload(TEMPLATE, data)
108108
resp = send_request(URL, payload).json()
109-
assert resp.get("object") == "error", "stop 超出个数应触发异常"
110-
assert "exceeds the limit max_stop_seqs_num" in resp.get("message", ""), "未返回预期的报错信息"
109+
assert resp.get("detail").get("object") == "error", "stop 超出个数应触发异常"
110+
assert "exceeds the limit max_stop_seqs_num" in resp.get("detail").get("message", ""), "未返回预期的报错信息"
111111

112112

113113
def test_stop_seq_exceed_length():
@@ -120,5 +120,5 @@ def test_stop_seq_exceed_length():
120120
}
121121
payload = build_request_payload(TEMPLATE, data)
122122
resp = send_request(URL, payload).json()
123-
assert resp.get("object") == "error", "stop 超出长度应触发异常"
124-
assert "exceeds the limit stop_seqs_max_len" in resp.get("message", ""), "未返回预期的报错信息"
123+
assert resp.get("detail").get("object") == "error", "stop 超出长度应触发异常"
124+
assert "exceeds the limit stop_seqs_max_len" in resp.get("detail").get("message", ""), "未返回预期的报错信息"

0 commit comments

Comments
 (0)