MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / test_null_metadata

Function test_null_metadata

tests/ce/server/test_evil_cases.py:68–78  ·  view source on GitHub ↗

metadata = null

()

Source from the content-addressed store, hash-verified

66
67
68def test_null_metadata():
69 """metadata = null"""
70 data = {
71 "stream": False,
72 "messages": [{"role": "user", "content": "介绍下你自己"}],
73 "max_tokens": 10,
74 "metadata": None,
75 }
76 payload = build_request_payload(TEMPLATE, data)
77 resp = send_request(URL, payload).json()
78 assert "error" not in resp, "metadata=null 应被容忍而不是报错"
79
80
81def test_top_p_exceed_1():

Callers

nothing calls this directly

Calls 2

build_request_payloadFunction · 0.90
send_requestFunction · 0.90

Tested by

no test coverage detected