-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix licensing client error logging #329
Fix licensing client error logging #329
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, apart from some NITs and a test case addition request
|
||
mock_response.raise_for_status.assert_called_once() | ||
|
||
mock_response = self.setup_mock_response(mock_post) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't this supposed to setup the Exception
side_effect?
{'error': {'code': 409, 'message': 'test_message'}} | ||
) | ||
mock_raise_response_error.assert_called_once_with(mock_response) | ||
mock_response.raise_for_status.assert_not_called() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any raise_for_status
call in _do_req
we should be concerned about?
@@ -405,4 +477,4 @@ def test_delete_reservation(self, mock_do_req): | |||
'delete', '/reservations/%s' % self.reservation_id, | |||
raw_response=True | |||
) | |||
mock_response.raise_for_status.assert_called_once() | |||
mock_raise_response_error.assert_called_once_with(mock_response) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add a case for delete_reservation
where the response if not ok
, and the error code is different from 404
.
c470666
to
a062898
Compare
a062898
to
6160f71
Compare
This PR fixes error log in licensing client when deleting reservation.