This repository was archived by the owner on Apr 12, 2023. It is now read-only.
Small misc cleanups#31
Merged
Merged
Conversation
We need to explicitly cast these exceptions to a str before using them - as we're concatenating the messages. The ValueError is thrown by the JSON parsing, so the response line should be moved outside of the try/catch statement, so that we can be sure that the `response` value is actually defined for the catch statement.
There is no need to assign these client tests to the object itself, as the result is tested within the method. The assignment _could_ have side effects somewhere later (if the teardown for some reason isn't ran as assumed). To avoid any potential side effects we keep the assignments local to the method.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a collection of patches that by themselves are too small to warrant separate pull requests. In general they clean up things that work (and a few that didn't) for better style, clearer intent and future proofing. Each patch has comments related to what (and why) it fixes.