Skip to content

Commit a18569e

Browse files
leeandherclaude
andcommitted
test(integrations): Remove vacuous missing-integration test
The test_missing_integration_filtered_from_response test never exercised the None-filtering logic it claimed to test. The Integration foreign key uses CASCADE on_delete, so deleting the Integration also cascade-deleted the OrganizationIntegration row, leaving zero results for the queryset. Even bypassing CASCADE, the queryset's integration__status JOIN would exclude orphaned rows. The test passed vacuously regardless of whether the fix existed. The remaining test_serialization_error_filtered_from_response properly exercises the None-filtering by triggering a real exception in _serialize. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2a2852a commit a18569e

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

tests/sentry/integrations/api/endpoints/test_user_organizationintegration.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import orjson
44

5-
from sentry.integrations.models.integration import Integration
65
from sentry.testutils.cases import APITestCase
76
from sentry.testutils.silo import control_silo_test
87

@@ -74,19 +73,6 @@ def test_billing_users_dont_see_integrations(self) -> None:
7473
content = orjson.loads(response.content)
7574
assert content == []
7675

77-
def test_missing_integration_filtered_from_response(self) -> None:
78-
"""OrganizationIntegrations whose Integration was deleted don't produce null entries."""
79-
integration = self.create_provider_integration(provider="github")
80-
self.create_organization_integration(
81-
organization_id=self.organization.id, integration_id=integration.id
82-
)
83-
84-
# Delete the Integration row directly to simulate orphaned state
85-
Integration.objects.filter(id=integration.id).delete()
86-
87-
response = self.get_success_response(self.user.id)
88-
assert response.data == []
89-
9076
def test_serialization_error_filtered_from_response(self) -> None:
9177
"""An exception during serialization should produce an empty list, not null entries."""
9278
integration = self.create_provider_integration(provider="github")

0 commit comments

Comments
 (0)