Skip to content

Commit c0b0893

Browse files
asottile-sentryChristinarlong
authored andcommitted
ref: prevent clobbering create_integration in base class (#74809)
fixes an error in mypy 1.11 <!-- Describe your PR here. -->
1 parent 1326a16 commit c0b0893

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tests/sentry/integrations/github/test_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class GithubSearchTest(APITestCase):
1616
provider = "github"
1717
base_url = "https://api.github.com"
1818

19-
def create_integration(self):
19+
def _create_integration(self):
2020
future = datetime.now() + timedelta(hours=1)
2121
return self.create_provider_integration(
2222
provider=self.provider,
@@ -32,7 +32,7 @@ def create_integration(self):
3232

3333
def setUp(self):
3434
super().setUp()
35-
self.integration = self.create_integration()
35+
self.integration = self._create_integration()
3636
identity = Identity.objects.create(
3737
idp=self.create_identity_provider(type=self.provider),
3838
user=self.user,

tests/sentry/integrations/github_enterprise/test_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class GithubEnterpriseSearchTest(test_search.GithubSearchTest):
1212
provider = "github_enterprise"
1313
base_url = "https://github.example.org/api/v3"
1414

15-
def create_integration(self):
15+
def _create_integration(self):
1616
future = datetime.now() + timedelta(hours=1)
1717
return self.create_provider_integration(
1818
provider=self.provider,

tests/sentry/integrations/opsgenie/test_notify_action.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class OpsgenieNotifyTeamTest(RuleTestCase, PerformanceIssueTestCase):
2525
rule_cls = OpsgenieNotifyTeamAction
2626

27-
def create_integration(self, name):
27+
def _create_integration(self, name):
2828
integration = self.create_provider_integration(
2929
provider="opsgenie", name=name, external_id=name, metadata=METADATA
3030
)
@@ -34,7 +34,7 @@ def create_integration(self, name):
3434
def setUp(self):
3535
self.team1 = {"id": "123-id", "team": "cool-team", "integration_key": "1234-5678"}
3636
with assume_test_silo_mode(SiloMode.CONTROL):
37-
self.integration = self.create_integration(name="test-app")
37+
self.integration = self._create_integration(name="test-app")
3838
with assume_test_silo_mode(SiloMode.CONTROL):
3939
self.org_integration = OrganizationIntegration.objects.get(
4040
organization_id=self.organization.id, integration_id=self.integration.id
@@ -170,7 +170,7 @@ def test_invalid_int_id(self):
170170
def test_notifies_with_multiple_og_accounts(self):
171171
team2 = {"id": "456-id", "team": "cooler-team", "integration_key": "1234-7890"}
172172
with assume_test_silo_mode(SiloMode.CONTROL):
173-
integration = self.create_integration("test-app-2")
173+
integration = self._create_integration("test-app-2")
174174
org_integration = OrganizationIntegration.objects.get(
175175
organization_id=self.organization.id, integration_id=integration.id
176176
)
@@ -213,7 +213,7 @@ def test_notifies_with_multiple_og_accounts(self):
213213
def test_invalid_team_selected(self):
214214
team2 = {"id": "456-id", "team": "cooler-team", "integration_key": "1234-7890"}
215215
with assume_test_silo_mode(SiloMode.CONTROL):
216-
integration = self.create_integration("test-app-2")
216+
integration = self._create_integration("test-app-2")
217217
org_integration = OrganizationIntegration.objects.get(
218218
organization_id=self.organization.id, integration_id=integration.id
219219
)
@@ -248,7 +248,7 @@ def test_bad_integration_key(self):
248248
def test_team_deleted(self, mock_logger: MagicMock):
249249
team2 = {"id": "456-id", "team": "cooler-team", "integration_key": "1234-7890"}
250250
with assume_test_silo_mode(SiloMode.CONTROL):
251-
integration = self.create_integration("test-app-2")
251+
integration = self._create_integration("test-app-2")
252252
org_integration = OrganizationIntegration.objects.get(
253253
organization_id=self.organization.id, integration_id=integration.id
254254
)

0 commit comments

Comments
 (0)