(self)
| 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 | |
| 122 | class ContainerErrorTest(unittest.TestCase): |
nothing calls this directly
no test coverage detected