MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / test_server_error

Function test_server_error

tests/api_utils/test_error_utils.py:150–160  ·  view source on GitHub ↗

Test scenario: Create 500 server error Verify: Status code and message format

()

Source from the content-addressed store, hash-verified

148
149
150def test_server_error():
151 """
152 Test scenario: Create 500 server error
153 Verify: Status code and message format
154 """
155 from api_utils.error_utils import server_error
156
157 result = server_error(req_id="req505", message="Internal processing failure")
158
159 assert result.status_code == 500
160 assert result.detail == "[req505] Internal processing failure"
161
162
163def test_upstream_error():

Callers

nothing calls this directly

Calls 1

server_errorFunction · 0.90

Tested by

no test coverage detected