MCPcopy Index your code
hub / github.com/docker/docker-py / test_is_error_400

Method test_is_error_400

tests/unit/errors_test.py:94–99  ·  view source on GitHub ↗

Report error on 400 response.

(self)

Source from the content-addressed store, hash-verified

92 assert err.is_error() is False
93
94 def test_is_error_400(self):
95 """Report error on 400 response."""
96 resp = requests.Response()
97 resp.status_code = 400
98 err = APIError('', response=resp)
99 assert err.is_error() is True
100
101 def test_is_error_500(self):
102 """Report error on 500 response."""

Callers

nothing calls this directly

Calls 2

is_errorMethod · 0.95
APIErrorClass · 0.90

Tested by

no test coverage detected