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

Method test_create_error_from_exception

tests/unit/errors_test.py:108–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106 assert err.is_error() is True
107
108 def test_create_error_from_exception(self):
109 resp = requests.Response()
110 resp.status_code = 500
111 err = APIError('')
112 try:
113 resp.raise_for_status()
114 except requests.exceptions.HTTPError as e:
115 try:
116 create_api_error_from_http_exception(e)
117 except APIError as e:
118 err = e
119 assert err.is_server_error() is True
120
121
122class ContainerErrorTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

is_server_errorMethod · 0.95
APIErrorClass · 0.90

Tested by

no test coverage detected