-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds tests and version bump. - Renames internal module from Playoff to Playoffs. - Adds pytest around the playoff endpoints. - Version bump to 2.6.0
- Loading branch information
Showing
5 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Should this be driven by the main pyproject.toml file? yes, is it super convoluted? yes, can it wait? sure | ||
|
||
__version__ = "2.5.1" | ||
__version__ = "2.6.0" |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] | ||
name = "nhl-api-py" | ||
version = "2.5.1" | ||
version = "2.6.0" | ||
description = "NHL API. For standings, team stats, outcomes, player information. Contains each individual API endpoint as well as convience methods for easy data loading in Pandas or any ML applications." | ||
authors = ["Corey Schaf <[email protected]>"] | ||
readme = "README.md" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from unittest import mock | ||
|
||
|
||
@mock.patch("httpx.Client.get") | ||
def test_carousel(h_m, nhl_client): | ||
nhl_client.playoffs.carousel(season="20232024") | ||
h_m.assert_called_once() | ||
assert h_m.call_args[1]["url"] == "https://api-web.nhle.com/v1/playoff-series/carousel/20232024" | ||
|
||
|
||
@mock.patch("httpx.Client.get") | ||
def test_schedule(h_m, nhl_client): | ||
nhl_client.playoffs.schedule(season="20232024", series="a") | ||
h_m.assert_called_once() | ||
assert h_m.call_args[1]["url"] == "https://api-web.nhle.com/v1/schedule/playoff-series/20232024/a" | ||
|
||
|
||
@mock.patch("httpx.Client.get") | ||
def test_bracket(h_m, nhl_client): | ||
nhl_client.playoffs.bracket(year="2024") | ||
h_m.assert_called_once() | ||
assert h_m.call_args[1]["url"] == "https://api-web.nhle.com/v1/playoff-bracket/2024" |