mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
fix unittest (#3328)
This commit is contained in:
@@ -106,8 +106,8 @@ def test_stop_seq_exceed_num():
|
|||||||
}
|
}
|
||||||
payload = build_request_payload(TEMPLATE, data)
|
payload = build_request_payload(TEMPLATE, data)
|
||||||
resp = send_request(URL, payload).json()
|
resp = send_request(URL, payload).json()
|
||||||
assert resp.get("object") == "error", "stop 超出个数应触发异常"
|
assert resp.get("detail").get("object") == "error", "stop 超出个数应触发异常"
|
||||||
assert "exceeds the limit max_stop_seqs_num" in resp.get("message", ""), "未返回预期的报错信息"
|
assert "exceeds the limit max_stop_seqs_num" in resp.get("detail").get("message", ""), "未返回预期的报错信息"
|
||||||
|
|
||||||
|
|
||||||
def test_stop_seq_exceed_length():
|
def test_stop_seq_exceed_length():
|
||||||
@@ -120,5 +120,5 @@ def test_stop_seq_exceed_length():
|
|||||||
}
|
}
|
||||||
payload = build_request_payload(TEMPLATE, data)
|
payload = build_request_payload(TEMPLATE, data)
|
||||||
resp = send_request(URL, payload).json()
|
resp = send_request(URL, payload).json()
|
||||||
assert resp.get("object") == "error", "stop 超出长度应触发异常"
|
assert resp.get("detail").get("object") == "error", "stop 超出长度应触发异常"
|
||||||
assert "exceeds the limit stop_seqs_max_len" in resp.get("message", ""), "未返回预期的报错信息"
|
assert "exceeds the limit stop_seqs_max_len" in resp.get("detail").get("message", ""), "未返回预期的报错信息"
|
||||||
|
Reference in New Issue
Block a user