From b1e8e85b0bb774d455ea5197bc4b9290516f5408 Mon Sep 17 00:00:00 2001 From: Brad Hurley Date: Mon, 29 Jun 2020 16:54:53 -0400 Subject: [PATCH 1/3] Updating Models to reflect new attributes added by MLB --- test/test_draft.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/test_draft.py b/test/test_draft.py index 1cd8141..5cee618 100644 --- a/test/test_draft.py +++ b/test/test_draft.py @@ -60,14 +60,3 @@ def test_bad_draft_year(): with pytest.raises(BadRequestError): pyball.get_draft_by_year("BadYear") - -def test_get_not_found_draft(): - pyball = PyBall() - with pytest.raises(NotFound): - pyball._get("{}/draft".format(BASE_URL)) - - -def test_get_not_found_draft_prospects(): - pyball = PyBall() - with pytest.raises(NotFound): - pyball._get("{}/draft/prospects".format(BASE_URL)) From f24819982ba04f1b1485b3b59bcf4e6fffe71fd4 Mon Sep 17 00:00:00 2001 From: Brad Hurley Date: Mon, 29 Jun 2020 17:05:01 -0400 Subject: [PATCH 2/3] mend --- pyball/models/config/position.py | 1 + pyball/models/team/coach.py | 1 + test/test_draft.py | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyball/models/config/position.py b/pyball/models/config/position.py index 4183893..619e4e4 100644 --- a/pyball/models/config/position.py +++ b/pyball/models/config/position.py @@ -13,3 +13,4 @@ class Position: fielder: bool = None displayName: str = None formalName: str = None # noqa: E701 + gamePosition: bool = None diff --git a/pyball/models/team/coach.py b/pyball/models/team/coach.py index ee65376..4908a75 100644 --- a/pyball/models/team/coach.py +++ b/pyball/models/team/coach.py @@ -10,6 +10,7 @@ class Coach: jerseyNumber: str = None job: str = None jobId: str = None + title: str = None def __post_init__(self): self.person = Person(**self.person) diff --git a/test/test_draft.py b/test/test_draft.py index 5cee618..b250378 100644 --- a/test/test_draft.py +++ b/test/test_draft.py @@ -9,8 +9,7 @@ from pyball.models.generic_team import Team from pyball.models import Person -from pyball.exceptions import BadRequestError, NotFound -from pyball.constants import BASE_URL +from pyball.exceptions import BadRequestError @pytest.fixture(scope='module') From d0e575d5308eec6a0e3b0d882751d560a1dac654 Mon Sep 17 00:00:00 2001 From: Brad Hurley Date: Mon, 29 Jun 2020 17:07:50 -0400 Subject: [PATCH 3/3] Fixing flake8 issues --- test/test_draft.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_draft.py b/test/test_draft.py index b250378..925ea06 100644 --- a/test/test_draft.py +++ b/test/test_draft.py @@ -58,4 +58,3 @@ def test_bad_draft_year(): pyball = PyBall() with pytest.raises(BadRequestError): pyball.get_draft_by_year("BadYear") -