Test scenario: Create basic HTTP error Strategy: Pure function test, no mocking needed
()
| 8 | |
| 9 | |
| 10 | def 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 | |
| 25 | def test_http_error_with_headers(): |
nothing calls this directly
no test coverage detected