Skip to content

Commit 473a62d

Browse files
committed
Remove app install auth decorator where possible
1 parent b126eda commit 473a62d

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/github3/checks.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ def _update_attributes(self, suite):
216216
def _repr(self):
217217
return "<{s.class_name} [{s.id}:{s.status}]>".format(s=self)
218218

219-
@decorators.requires_app_installation_auth
220219
def rerequest(self):
221220
"""Rerequest the check suite.
222221
@@ -230,7 +229,6 @@ def rerequest(self):
230229
self._post(url, headers=CheckSuite.CUSTOM_HEADERS), 201, 404
231230
)
232231

233-
@decorators.requires_app_installation_auth
234232
def check_runs(self):
235233
"""Retrieve the check runs for this suite.
236234
@@ -346,7 +344,6 @@ def _update_attributes(self, output):
346344
def _repr(self):
347345
return "<{s.class_name} [{s.title}]>".format(s=self)
348346

349-
@decorators.requires_app_installation_auth
350347
def annotations(self):
351348
"""Retrieve the annotations for a check run.
352349

tests/unit/test_checks.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
from .helper import (
1111
UnitAppInstallHelper,
1212
UnitRequiresAuthenticationHelper,
13-
UnitIteratorAppInstHelper,
13+
UnitHelper,
14+
UnitIteratorHelper,
1415
create_url_helper,
1516
create_example_data_helper,
1617
)
@@ -58,7 +59,7 @@ def test_update_requires_auth(self):
5859
self.instance.update(name="newname")
5960

6061

61-
class TestCheckSuite(UnitAppInstallHelper):
62+
class TestCheckSuite(UnitHelper):
6263
described_class = CheckSuite
6364
example_data = check_suite_example_data()
6465

@@ -82,7 +83,7 @@ def test_check_suite_types(self):
8283
)
8384

8485

85-
class TestCheckSuiteIteratorAppInstAuth(UnitIteratorAppInstHelper):
86+
class TestCheckSuiteIterator(UnitIteratorHelper):
8687
described_class = CheckSuite
8788
example_data = check_suite_example_data()
8889

@@ -95,13 +96,3 @@ def test_check_runs(self):
9596
params={"per_page": 100},
9697
headers=CheckSuite.CUSTOM_HEADERS,
9798
)
98-
99-
100-
class TestCheckSuiteRequiresAuth(UnitRequiresAuthenticationHelper):
101-
described_class = CheckSuite
102-
example_data = check_suite_example_data()
103-
104-
def test_rerequest_requires_auth(self):
105-
"""Show rerequesting a run requires auth"""
106-
with pytest.raises(GitHubException):
107-
self.instance.rerequest()

0 commit comments

Comments
 (0)