-
-
Notifications
You must be signed in to change notification settings - Fork 355
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] delivery_postlogistics: raise exception when no token received #898
Conversation
9647d9d
to
3470491
Compare
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.
LGTM
73da793
to
758a53a
Compare
do not merge ATM, seems this exception is not correctly raised (raised when service works fine) |
This PR has the |
018becf
to
867d06d
Compare
867d06d
to
3d3afc8
Compare
|
||
def test_postlogistics_get_token_error(self): | ||
with recorder.use_cassette("test_token_error") as cassette: | ||
with self.assertRaises(UserError): |
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.
It's always better to use assertRaisesRegex
w/ a pattern matching the error msg.
Too often I've seen an exception raised somewhere else 😉
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.
thanks @simahawk , updated test.
3d3afc8
to
5bd89cb
Compare
Sometimes due to API error it may happen we don't receive anything back when requesting token. In this case we want to show meaningful message.
5bd89cb
to
0b14913
Compare
/ocabot merge patch |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 1c61d7b. Thanks a lot for contributing to OCA. ❤️ |
Sometimes due to API error it may happen we don't receive anything back when requesting token. In this case we want to show meaningful message.