Skip to content

Commit fa26d85

Browse files
committed
fix: address review feedback — remove empty tests, use __class__ is for type comparison
- Remove empty signature verification tests (no assertions, always pass) - Remove empty extract_payload test (no assertions, always pass) - Use client1.__class__ is client2.__class__ for exact type comparison
1 parent 625919a commit fa26d85

2 files changed

Lines changed: 1 addition & 32 deletions

File tree

tests/test_core.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,6 @@ def test_client_with_payload_installation(self, mock_ghapi, mock_get_token):
357357

358358

359359
class TestGitHubAppWebhookHandling:
360-
def test_extract_payload_valid_json(self):
361-
app = FastAPI()
362-
github_app = GitHubApp(app)
363-
github_app.init_app(app)
364-
365-
with TestClient(app):
366-
# simplified; no real assertion here
367-
pass
368-
369360
def test_handle_request_missing_content_type(self):
370361
app = FastAPI()
371362
GitHubApp(app)
@@ -449,28 +440,6 @@ async def async_test_handler():
449440
assert "async_test_handler" in data["calls"]
450441

451442

452-
class TestGitHubAppWebhookSignatureVerification:
453-
def test_signature_verification_disabled(self):
454-
app = FastAPI()
455-
GitHubApp(app, github_app_secret=False)
456-
# Webhooks work without signature headers when verification is disabled
457-
458-
def test_signature_verification_sha256_valid(self):
459-
app = FastAPI()
460-
GitHubApp(app, github_app_secret=b"test_secret")
461-
# Valid SHA256 signatures are accepted
462-
463-
def test_signature_verification_sha256_invalid(self):
464-
app = FastAPI()
465-
GitHubApp(app, github_app_secret=b"test_secret")
466-
# Invalid SHA256 signatures are rejected
467-
468-
def test_signature_verification_sha1_fallback(self):
469-
app = FastAPI()
470-
GitHubApp(app, github_app_secret=b"test_secret")
471-
# SHA1 signatures work when SHA256 is not present
472-
473-
474443
class TestGitHubAppIntegration:
475444
def test_full_webhook_flow(self):
476445
"""Test complete webhook handling flow"""

tests/test_rate_limiting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def test_get_client_alias(self):
133133
client2 = self.app.get_client(123)
134134

135135
# Both should return the same type of object
136-
assert isinstance(client1, type(client2))
136+
assert client1.__class__ is client2.__class__
137137

138138
def test_decorator_restores_original_methods(self):
139139
"""Test that the decorator properly restores original methods after execution."""

0 commit comments

Comments
 (0)