| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Back | FazBrowse Home | New Git URL |
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityShould we add the following assertion?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe problem I see with that is it would force any test not using the default to pass that argument. I aligned with the other want args, if it's specified, check it, otherwise don't. That said, it's your code base so I defer to you. Lmk if you want me to change it.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIt doesn't. It can default to None, in which case we assert against _http_client.DEFAULT_TIMEOUT.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThat's what I'm saying, if someone added a test using user_mgt_app_with_timeout, but didn't pass a timeout to this function (presumably because they didn't care about asserting the value), it would fail.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIn the implementation we already default the client to _http_client.DEFAULT_TIMEOUT. In what scenario do we expect that assertion to not hold?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIf an app is used with a non-default timeout, but someone is either unaware of the want_timeout parameter or explicitly does not wish to make an assertion around it. Just biasing towards explicit > implicit per BDFL. Implementing the suggested behavior would implicitly check timeout. It also adds assertions to existing tests, whereas the original implementation results in no change to existing tests/assertions.
For a concrete example, if I removed the TEST_TIMEOUT from test_get_user_with_timeout, the test would fail, but, IMO, it would not be readily obvious just inspecting the test function why (nowhere did I make an assertion or ask an assertion to be made around timeout, so why is that happening?).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThat was my intended goal. Ideally, the _check_request() helper function should make assertions about the traits that are common to all requests made by the auth client. We probably should have had the timeout assertion there to begin with. The want_body shouldn't be an optional argument. It's always specified.
Anyway, all these changes can probably be lumped into a separate PR. For now I'm happy with where this stands.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.