-
Notifications
You must be signed in to change notification settings - Fork 281
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
Pass a list as expected_status #322
Comments
Thanks for the suggestion of passing multiple expected values, it could be an enhancement.
If I understand properly you could specify expected_status='any' and then evaluate the response. |
Right for improvement.. for instance, say may be a string or list of values
or
something in that line which user can input. this gives us the flexibility to be able to anticipate multiple valid return codes from the server. plus if it doesn't get the expected status, we would want to get return response if errors/mismatched execrated status and not exception which is currently happening. example:
|
As said you could pass 'any' as expected status in order not to let the keyword fail. |
When targeting GET on a URI if its not found / internal server error results in exception
HTTPError
, I can use theexpected_status
to override it however, it would be great if that accepts multiple valuesOther use cases like where example,
it would raise the
HTTPError
if expected_status is not used and errors outif the expected state mismatched, it raise exception as well
we would love to have the response than handle the exception in robot caller test code/scripts.
The text was updated successfully, but these errors were encountered: