Skip to content

Commit 21a79d4

Browse files
ref(py): Move {org -> organization}_auth_tokens (#83677)
1 parent cb0b2a2 commit 21a79d4

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed

src/sentry/api/endpoints/org_auth_token_details.py renamed to src/sentry/api/endpoints/organization_auth_token_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
@control_silo_endpoint
20-
class OrgAuthTokenDetailsEndpoint(ControlSiloOrganizationEndpoint):
20+
class OrganizationAuthTokenDetailsEndpoint(ControlSiloOrganizationEndpoint):
2121
publish_status = {
2222
"DELETE": ApiPublishStatus.PRIVATE,
2323
"GET": ApiPublishStatus.PRIVATE,

src/sentry/api/endpoints/org_auth_tokens.py renamed to src/sentry/api/endpoints/organization_auth_tokens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434

3535
@control_silo_endpoint
36-
class OrgAuthTokensEndpoint(ControlSiloOrganizationEndpoint):
36+
class OrganizationAuthTokensEndpoint(ControlSiloOrganizationEndpoint):
3737
publish_status = {
3838
"GET": ApiPublishStatus.PRIVATE,
3939
"POST": ApiPublishStatus.PRIVATE,

src/sentry/api/urls.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
from sentry.api.endpoints.group_autofix_setup_check import GroupAutofixSetupCheck
88
from sentry.api.endpoints.group_integration_details import GroupIntegrationDetailsEndpoint
99
from sentry.api.endpoints.group_integrations import GroupIntegrationsEndpoint
10-
from sentry.api.endpoints.org_auth_token_details import OrgAuthTokenDetailsEndpoint
11-
from sentry.api.endpoints.org_auth_tokens import OrgAuthTokensEndpoint
10+
from sentry.api.endpoints.organization_auth_token_details import (
11+
OrganizationAuthTokenDetailsEndpoint,
12+
)
13+
from sentry.api.endpoints.organization_auth_tokens import OrganizationAuthTokensEndpoint
1214
from sentry.api.endpoints.organization_events_anomalies import OrganizationEventsAnomaliesEndpoint
1315
from sentry.api.endpoints.organization_events_root_cause_analysis import (
1416
OrganizationEventsRootCauseAnalysisEndpoint,
@@ -1903,12 +1905,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]:
19031905
),
19041906
re_path(
19051907
r"^(?P<organization_id_or_slug>[^\/]+)/org-auth-tokens/$",
1906-
OrgAuthTokensEndpoint.as_view(),
1908+
OrganizationAuthTokensEndpoint.as_view(),
19071909
name="sentry-api-0-org-auth-tokens",
19081910
),
19091911
re_path(
19101912
r"^(?P<organization_id_or_slug>[^\/]+)/org-auth-tokens/(?P<token_id>[^\/]+)/$",
1911-
OrgAuthTokenDetailsEndpoint.as_view(),
1913+
OrganizationAuthTokenDetailsEndpoint.as_view(),
19121914
name="sentry-api-0-org-auth-token-details",
19131915
),
19141916
re_path(

src/sentry/conf/api_pagination_allowlist_do_not_modify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
"JiraSearchEndpoint",
2727
"JiraServerSearchEndpoint",
2828
"KeyTransactionEndpoint",
29-
"OrgAuthTokensEndpoint",
3029
"OrganizationAccessRequestDetailsEndpoint",
3130
"OrganizationAlertRuleAvailableActionIndexEndpoint",
3231
"OrganizationApiKeyIndexEndpoint",
3332
"OrganizationAuthProvidersEndpoint",
33+
"OrganizationAuthTokensEndpoint",
3434
"OrganizationDeriveCodeMappingsEndpoint",
3535
"OrganizationEnvironmentsEndpoint",
3636
"OrganizationEventsFacetsEndpoint",

tests/sentry/api/endpoints/test_org_auth_token_details.py renamed to tests/sentry/api/endpoints/test_organization_auth_token_details.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
@control_silo_test
12-
class OrgAuthTokenDetailTest(APITestCase):
12+
class OrganizationAuthTokenDetailTest(APITestCase):
1313
endpoint = "sentry-api-0-org-auth-token-details"
1414

1515
def test_simple(self):
@@ -125,7 +125,7 @@ def test_get_deleted(self):
125125

126126

127127
@control_silo_test
128-
class OrgAuthTokenEditTest(APITestCase):
128+
class OrganizationAuthTokenEditTest(APITestCase):
129129
endpoint = "sentry-api-0-org-auth-token-details"
130130
method = "PUT"
131131

@@ -283,7 +283,7 @@ def test_update_deleted(self):
283283

284284

285285
@control_silo_test
286-
class OrgAuthTokenDeleteTest(APITestCase):
286+
class OrganizationAuthTokenDeleteTest(APITestCase):
287287
endpoint = "sentry-api-0-org-auth-token-details"
288288
method = "DELETE"
289289

@@ -374,7 +374,7 @@ def test_delete_deleted(self):
374374

375375

376376
@control_silo_test
377-
class OrgAuthTokenDetailsPermissionTest(PermissionTestCase):
377+
class OrganizationAuthTokenDetailsPermissionTest(PermissionTestCase):
378378
putData = {"name": "token-1"}
379379

380380
def setUp(self):

tests/sentry/api/endpoints/test_org_auth_tokens.py renamed to tests/sentry/api/endpoints/test_organization_auth_tokens.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
@control_silo_test
13-
class OrgAuthTokensListTest(APITestCase):
13+
class OrganizationAuthTokensListTest(APITestCase):
1414
endpoint = "sentry-api-0-org-auth-tokens"
1515

1616
def test_simple(self):
@@ -108,7 +108,7 @@ def test_other_org(self):
108108

109109

110110
@control_silo_test(regions=create_test_regions("us"))
111-
class OrgAuthTokenCreateTest(APITestCase):
111+
class OrganizationAuthTokenCreateTest(APITestCase):
112112
endpoint = "sentry-api-0-org-auth-tokens"
113113
method = "POST"
114114

@@ -188,7 +188,7 @@ def test_other_org(self):
188188

189189

190190
@control_silo_test
191-
class OrgAuthTokensPermissionTest(PermissionTestCase):
191+
class OrganizationAuthTokensPermissionTest(PermissionTestCase):
192192
postData = {"name": "token-1"}
193193

194194
def setUp(self):

0 commit comments

Comments
 (0)