Fixes #3321 - Converts to pytest and improves coverage#3322
Merged
karlcow merged 4 commits intowebcompat:masterfrom Jun 1, 2020
Merged
Fixes #3321 - Converts to pytest and improves coverage#3322karlcow merged 4 commits intowebcompat:masterfrom
karlcow merged 4 commits intowebcompat:masterfrom
Conversation
That will make testing easier in certain casesby giving a github_data mock which has a meaning github_data.json() function.
This simplifies a bit the tests and it exposes only what we need in this context.
miketaylr
requested changes
May 29, 2020
Member
miketaylr
left a comment
There was a problem hiding this comment.
Looks good! Just a few minor changes.
ksy36
approved these changes
May 30, 2020
1. It converts all the tests to pytest format 2. It adds new tests for handling the scenario which were not previously tested (as revealed by coverage). issues.py is now 100% covered.
Member
Author
|
ok rebased. and pushed. |
miketaylr
approved these changes
Jun 1, 2020
Member
miketaylr
left a comment
There was a problem hiding this comment.
LGTM. Feel free to rename the client method or not, up to you.
Member
|
Thanks Karl, very nice improvements. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR fixes issue #3321
Proposed PR background
Please provide enough information so that others can review your pull request:
This took a bit more time than I was expecting but I have figured out a couple of things.
This also should lead to more test organization. I need to open an issue so that we put the mock_api_response outside of test_api_urls. (probably in conftest.py if I understood well pytest)
Anyway.
It basically
.json()method for the mocks.Now we have 100% coverage for the issues.py module. See #3205 for the work to do still.
ok let's see if we stay green or if we broke something.