MCPcopy
hub / github.com/gpustack/gpustack / test_raise_if_response_error

Function test_raise_if_response_error

tests/api/test_exceptions.py:152–159  ·  view source on GitHub ↗
(name, given, expected)

Source from the content-addressed store, hash-verified

150 ],
151)
152def test_raise_if_response_error(name, given, expected):
153 try:
154 raise_if_response_error(given)
155 assert expected is None, f"Case {name} expected get exception but none"
156 except Exception as e:
157 assert str(e) == str(
158 expected
159 ), f"Case {name} expected exception {expected} but got {e}"

Callers

nothing calls this directly

Calls 1

raise_if_response_errorFunction · 0.90

Tested by

no test coverage detected