summaryrefslogtreecommitdiff
path: root/tests/unit/errors_test.py
Commit message (Collapse)AuthorAgeFilesLines
* fixes create_api_error_from_http_exception()Constantine Peresypkin2017-12-181-1/+15
| | | | | | | | `create_api_error_from_http_exception()` is never tested in the original code and will fail miserably when fed with empty `HTTPError` object see fixes in requests for this behaviour: https://github.com/requests/requests/pull/3179 Signed-off-by: Constantine Peresypkin <pconstantine@gmail.com>
* client.containers.run returns None if none of json-file or journald logging ↵Artem Bolshakov2017-08-171-1/+33
| | | | | | drivers used Signed-off-by: Artem Bolshakov <either.free@gmail.com>
* Fix APIError status_code property for client/server errorsalex-dr2017-03-221-0/+65
| | | | | | | | | | | | | requests.Response objects evaluate as falsy when the status_code attribute is in the 400-500 range. Therefore we are assured that prior to this change, APIError would show `is_server_error() == False` when generated with a 500-level response and `is_client_error() == False` when generated with a 400-level response. This is not desirable. Added some seemingly dry (not DRY) unit tests to ensure nothing silly slips back in here. Signed-off-by: alex-dr <alex@datarobot.com>
* Add new user-focused APIBen Firshman2016-11-221-0/+22
See #1086 Signed-off-by: Ben Firshman <ben@firshman.co.uk>