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

Function test_http_error_basic

tests/api_utils/test_error_utils.py:10–22  ·  view source on GitHub ↗

Test scenario: Create basic HTTP error Strategy: Pure function test, no mocking needed

()

Source from the content-addressed store, hash-verified

8
9
10def test_http_error_basic():
11 """
12 Test scenario: Create basic HTTP error
13 Strategy: Pure function test, no mocking needed
14 """
15 from api_utils.error_utils import http_error
16
17 result = http_error(status_code=404, detail="Not found")
18
19 assert isinstance(result, HTTPException)
20 assert result.status_code == 404
21 assert result.detail == "Not found"
22 assert result.headers is None
23
24
25def test_http_error_with_headers():

Callers

nothing calls this directly

Calls 1

http_errorFunction · 0.90

Tested by

no test coverage detected