wilhelmagren / gromp

Holistic Python implementation of the public Riot Games Developer API.
MIT License
6 stars 1 forks source link

Implement API mocking in tests (#28) #29

Closed wilhelmagren closed 1 year ago

wilhelmagren commented 1 year ago

Started implementing mocked GET requests to the RG-API's using unittest.mock.patch decorator.

codecov[bot] commented 1 year ago

Codecov Report

Base: 86.69% // Head: 95.00% // Increases project coverage by +8.30% :tada:

Coverage data is based on head (d9aa018) compared to base (826cb56). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #29 +/- ## ========================================== + Coverage 86.69% 95.00% +8.30% ========================================== Files 43 42 -1 Lines 699 740 +41 ========================================== + Hits 606 703 +97 + Misses 93 37 -56 ``` | [Impacted Files](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren) | Coverage Δ | | |---|---|---| | [gromp/endpoint/league/Leaguev4.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-Z3JvbXAvZW5kcG9pbnQvbGVhZ3VlL0xlYWd1ZXY0LnB5) | `95.23% <ø> (+23.80%)` | :arrow_up: | | [gromp/endpoint/league/TournamentStubv4.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-Z3JvbXAvZW5kcG9pbnQvbGVhZ3VlL1RvdXJuYW1lbnRTdHVidjQucHk=) | `100.00% <ø> (+23.52%)` | :arrow_up: | | [tests/\_\_init\_\_.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-dGVzdHMvX19pbml0X18ucHk=) | `100.00% <ø> (ø)` | | | [tests/hook/\_\_init\_\_.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-dGVzdHMvaG9vay9fX2luaXRfXy5weQ==) | `100.00% <ø> (ø)` | | | [gromp/api/league/ChampionMasteryv4Api.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-Z3JvbXAvYXBpL2xlYWd1ZS9DaGFtcGlvbk1hc3Rlcnl2NEFwaS5weQ==) | `100.00% <100.00%> (+10.00%)` | :arrow_up: | | [gromp/api/league/LolChallengesv1Api.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-Z3JvbXAvYXBpL2xlYWd1ZS9Mb2xDaGFsbGVuZ2VzdjFBcGkucHk=) | `100.00% <100.00%> (+10.00%)` | :arrow_up: | | [tests/hook/league.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-dGVzdHMvaG9vay9sZWFndWUucHk=) | `100.00% <100.00%> (ø)` | | | [gromp/api/base.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-Z3JvbXAvYXBpL2Jhc2UucHk=) | `65.21% <0.00%> (+8.69%)` | :arrow_up: | | [gromp/endpoint/league/LeagueExpv4.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-Z3JvbXAvZW5kcG9pbnQvbGVhZ3VlL0xlYWd1ZUV4cHY0LnB5) | `100.00% <0.00%> (+9.09%)` | :arrow_up: | | [gromp/api/league/Matchv5Api.py](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren#diff-Z3JvbXAvYXBpL2xlYWd1ZS9NYXRjaHY1QXBpLnB5) | `100.00% <0.00%> (+10.00%)` | :arrow_up: | | ... and [20 more](https://codecov.io/gh/willeagren/gromp/pull/29?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Wilhelm+%C3%85gren)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.