Skip to content

Commit

Permalink
updated urlsq
Browse files Browse the repository at this point in the history
  • Loading branch information
iamrajjoshi committed May 13, 2024
1 parent bef6fe8 commit 580c497
Show file tree
Hide file tree
Showing 74 changed files with 501 additions and 454 deletions.
398 changes: 199 additions & 199 deletions src/sentry/api/urls.py

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions tests/sentry/api/endpoints/test_artifact_bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_get_artifact_bundles_with_multiple_bundles(self):
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project.organization.slug,
"organization_id_or_slug": project.organization.slug,
"project_id_or_slug": project.slug,
},
)
Expand Down Expand Up @@ -219,7 +219,7 @@ def test_get_artifact_bundles_with_single_bundle_without_release_dist_pair(self)
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project.organization.slug,
"organization_id_or_slug": project.organization.slug,
"project_id_or_slug": project.slug,
},
)
Expand Down Expand Up @@ -281,7 +281,7 @@ def test_get_artifact_bundles_with_multiple_release_dist_pairs_to_same_bundle(se
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project.organization.slug,
"organization_id_or_slug": project.organization.slug,
"project_id_or_slug": project.slug,
},
)
Expand Down Expand Up @@ -357,7 +357,7 @@ def test_get_artifact_bundles_with_no_bundles(self):
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project.organization.slug,
"organization_id_or_slug": project.organization.slug,
"project_id_or_slug": project.slug,
},
)
Expand Down Expand Up @@ -386,7 +386,7 @@ def test_get_artifact_bundles_pagination(self):
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project.organization.slug,
"organization_id_or_slug": project.organization.slug,
"project_id_or_slug": project.slug,
},
)
Expand Down Expand Up @@ -416,7 +416,7 @@ def test_get_artifact_bundles_sorting(self):
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project.organization.slug,
"organization_id_or_slug": project.organization.slug,
"project_id_or_slug": project.slug,
},
)
Expand Down Expand Up @@ -473,7 +473,7 @@ def test_delete_artifact_bundle_with_single_project_connected(self):
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project.organization.slug,
"organization_id_or_slug": project.organization.slug,
"project_id_or_slug": project.slug,
},
)
Expand Down Expand Up @@ -528,7 +528,7 @@ def test_delete_artifact_bundle_with_multiple_projects_connected(self):
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project_a.organization.slug,
"organization_id_or_slug": project_a.organization.slug,
"project_id_or_slug": project_a.slug,
},
)
Expand Down Expand Up @@ -584,7 +584,7 @@ def test_delete_artifact_bundles_with_same_bundle_id_and_connected_to_the_same_p
url = reverse(
"sentry-api-0-artifact-bundles",
kwargs={
"organization_slug": project_a.organization.slug,
"organization_id_or_slug": project_a.organization.slug,
"project_id_or_slug": project_a.slug,
},
)
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/api/endpoints/test_event_ai_suggested_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def setUp(self):
self.path = reverse(
"sentry-api-0-event-ai-fix-suggest",
kwargs={
"organization_slug": self.organization.slug,
"organization_id_or_slug": self.organization.slug,
"project_id_or_slug": self.project.slug,
"event_id": self.event.event_id,
},
Expand Down
12 changes: 6 additions & 6 deletions tests/sentry/api/endpoints/test_event_committers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_simple(self):
kwargs={
"event_id": event.event_id,
"project_id_or_slug": event.project.slug,
"organization_slug": event.project.organization.slug,
"organization_id_or_slug": event.project.organization.slug,
},
)

Expand Down Expand Up @@ -68,7 +68,7 @@ def test_no_group(self):
kwargs={
"event_id": event.event_id,
"project_id_or_slug": event.project.slug,
"organization_slug": event.project.organization.slug,
"organization_id_or_slug": event.project.organization.slug,
},
)

Expand All @@ -91,7 +91,7 @@ def test_no_release(self):
kwargs={
"event_id": event.event_id,
"project_id_or_slug": event.project.slug,
"organization_slug": event.project.organization.slug,
"organization_id_or_slug": event.project.organization.slug,
},
)

Expand Down Expand Up @@ -134,7 +134,7 @@ def test_null_stacktrace(self):
kwargs={
"event_id": event.event_id,
"project_id_or_slug": event.project.slug,
"organization_slug": event.project.organization.slug,
"organization_id_or_slug": event.project.organization.slug,
},
)

Expand Down Expand Up @@ -178,7 +178,7 @@ def test_with_commit_context(self):
kwargs={
"event_id": event.event_id,
"project_id_or_slug": event.project.slug,
"organization_slug": event.project.organization.slug,
"organization_id_or_slug": event.project.organization.slug,
},
)

Expand Down Expand Up @@ -238,7 +238,7 @@ def test_with_commit_context_pull_request(self):
kwargs={
"event_id": event.event_id,
"project_id_or_slug": event.project.slug,
"organization_slug": event.project.organization.slug,
"organization_id_or_slug": event.project.organization.slug,
},
)

Expand Down
14 changes: 7 additions & 7 deletions tests/sentry/api/endpoints/test_event_owners.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_no_rules(self):
self.path = reverse(
"sentry-api-0-event-owners",
kwargs={
"organization_slug": self.organization.slug,
"organization_id_or_slug": self.organization.slug,
"project_id_or_slug": self.project.slug,
"event_id": event1.event_id,
},
Expand All @@ -62,7 +62,7 @@ def test_no_matching_owners(self):
self.path = reverse(
"sentry-api-0-event-owners",
kwargs={
"organization_slug": self.organization.slug,
"organization_id_or_slug": self.organization.slug,
"project_id_or_slug": self.project.slug,
"event_id": event1.event_id,
},
Expand All @@ -88,7 +88,7 @@ def test_matching_non_existing_owner(self):
self.path = reverse(
"sentry-api-0-event-owners",
kwargs={
"organization_slug": self.organization.slug,
"organization_id_or_slug": self.organization.slug,
"project_id_or_slug": self.project.slug,
"event_id": event1.event_id,
},
Expand All @@ -114,7 +114,7 @@ def test_one_owner(self):
self.path = reverse(
"sentry-api-0-event-owners",
kwargs={
"organization_slug": self.organization.slug,
"organization_id_or_slug": self.organization.slug,
"project_id_or_slug": self.project.slug,
"event_id": event1.event_id,
},
Expand Down Expand Up @@ -146,7 +146,7 @@ def test_multiple_owners(self):
self.path = reverse(
"sentry-api-0-event-owners",
kwargs={
"organization_slug": self.organization.slug,
"organization_id_or_slug": self.organization.slug,
"project_id_or_slug": self.project.slug,
"event_id": event1.event_id,
},
Expand Down Expand Up @@ -179,7 +179,7 @@ def test_multiple_owners_order_matters(self):
self.path = reverse(
"sentry-api-0-event-owners",
kwargs={
"organization_slug": self.organization.slug,
"organization_id_or_slug": self.organization.slug,
"project_id_or_slug": self.project.slug,
"event_id": event1.event_id,
},
Expand Down Expand Up @@ -214,7 +214,7 @@ def test_owners_of_different_types_ordered_correctly(self):
self.path = reverse(
"sentry-api-0-event-owners",
kwargs={
"organization_slug": self.organization.slug,
"organization_id_or_slug": self.organization.slug,
"project_id_or_slug": self.project.slug,
"event_id": event1.event_id,
},
Expand Down
5 changes: 4 additions & 1 deletion tests/sentry/api/endpoints/test_group_tombstone.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def test_simple(self):

path = reverse(
"sentry-api-0-group-tombstones",
kwargs={"organization_slug": self.org.slug, "project_id_or_slug": self.project.slug},
kwargs={
"organization_id_or_slug": self.org.slug,
"project_id_or_slug": self.project.slug,
},
)

response = self.client.get(path)
Expand Down
4 changes: 2 additions & 2 deletions tests/sentry/api/endpoints/test_group_tombstone_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_delete(self):
path = reverse(
"sentry-api-0-group-tombstone-details",
kwargs={
"organization_slug": self.org.slug,
"organization_id_or_slug": self.org.slug,
"project_id_or_slug": self.project.slug,
"tombstone_id": tombstone.id,
},
Expand Down Expand Up @@ -67,7 +67,7 @@ def test_dont_delete_from_other_proj(self):
path = reverse(
"sentry-api-0-group-tombstone-details",
kwargs={
"organization_slug": self.org.slug,
"organization_id_or_slug": self.org.slug,
"project_id_or_slug": self.other_project.slug,
"tombstone_id": tombstone.id,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class OrganizationDashboardWidgetDetailsTestCase(OrganizationDashboardWidgetTest
def url(self):
return reverse(
"sentry-api-0-organization-dashboard-widget-details",
kwargs={"organization_slug": self.organization.slug},
kwargs={"organization_id_or_slug": self.organization.slug},
)

def test_valid_widget(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/api/endpoints/test_organization_dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setUp(self):
self.login_as(self.user)
self.url = reverse(
"sentry-api-0-organization-dashboards",
kwargs={"organization_slug": self.organization.slug},
kwargs={"organization_id_or_slug": self.organization.slug},
)
self.dashboard_2 = Dashboard.objects.create(
title="Dashboard 2", created_by_id=self.user.id, organization=self.organization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def setUp(self):

self.url = reverse(
"sentry-api-0-organization-invite-request-index",
kwargs={"organization_slug": self.organization.slug},
kwargs={"organization_id_or_slug": self.organization.slug},
)

def test_simple(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/api/endpoints/test_organization_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def setUp(self):

def do_request(self, query, **kwargs):
return self.client.get(
reverse(self.view, kwargs={"organization_slug": self.organization.slug}),
reverse(self.view, kwargs={"organization_id_or_slug": self.organization.slug}),
query,
format="json",
**kwargs,
Expand Down
8 changes: 4 additions & 4 deletions tests/sentry/api/endpoints/test_organization_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setUp(self):
def test_exposes_all_plugins_available_no_enabled_state(self):
url = reverse(
"sentry-api-0-organization-plugins",
kwargs={"organization_slug": self.projectA.organization.slug},
kwargs={"organization_id_or_slug": self.projectA.organization.slug},
)

url = f"{url}?plugins=_all"
Expand All @@ -37,7 +37,7 @@ def test_exposes_all_plugins_available_no_enabled_state(self):
def test_exposes_plugins_across_all_org_projects(self):
url = reverse(
"sentry-api-0-organization-plugins",
kwargs={"organization_slug": self.projectA.organization.slug},
kwargs={"organization_id_or_slug": self.projectA.organization.slug},
)

url = f"{url}?plugins=slack&plugins=webhooks"
Expand All @@ -56,7 +56,7 @@ def test_exposes_plugins_across_all_org_projects(self):
def test_exposes_specific_plugins_across_all_org_projects(self):
url = reverse(
"sentry-api-0-organization-plugins",
kwargs={"organization_slug": self.projectA.organization.slug},
kwargs={"organization_id_or_slug": self.projectA.organization.slug},
)

url = f"{url}?plugins=slack"
Expand All @@ -74,7 +74,7 @@ def test_exposes_specific_plugins_across_all_org_projects(self):
def test_ignore_plugins_that_dont_exist(self):
url = reverse(
"sentry-api-0-organization-plugins",
kwargs={"organization_slug": self.projectA.organization.slug},
kwargs={"organization_id_or_slug": self.projectA.organization.slug},
)

url = f"{url}?plugins=nope&plugins=beep&plugins=slack"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def setUp(self):

self.url = reverse(
"sentry-api-0-organization-plugins-configs",
kwargs={"organization_slug": self.organization.slug},
kwargs={"organization_id_or_slug": self.organization.slug},
)

self.login_as(user=self.user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def setUp(self):
self.team = self.create_team(organization=self.org)
self.url = reverse(
"sentry-api-0-organization-sent-first-event",
kwargs={"organization_slug": self.org.slug},
kwargs={"organization_id_or_slug": self.org.slug},
)

def test_simple_sent_first_event(self):
Expand Down
4 changes: 2 additions & 2 deletions tests/sentry/api/endpoints/test_organization_sdk_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setUp(self):

self.url = reverse(
"sentry-api-0-organization-sdk-updates",
kwargs={"organization_slug": self.organization.slug},
kwargs={"organization_id_or_slug": self.organization.slug},
)
self.features = {}

Expand Down Expand Up @@ -81,7 +81,7 @@ def test_no_projects(self):

url = reverse(
"sentry-api-0-organization-sdk-updates",
kwargs={"organization_slug": org.slug},
kwargs={"organization_id_or_slug": org.slug},
)

with self.feature(self.features):
Expand Down
5 changes: 3 additions & 2 deletions tests/sentry/api/endpoints/test_organization_spans_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def do_request(self, features=None, **kwargs):
features = ["organizations:performance-trace-explorer"]
with self.feature(features):
return self.client.get(
reverse(self.view, kwargs={"organization_slug": self.organization.slug}),
reverse(self.view, kwargs={"organization_id_or_slug": self.organization.slug}),
format="json",
**kwargs,
)
Expand Down Expand Up @@ -71,7 +71,8 @@ def do_request(self, key: str, features=None, **kwargs):
with self.feature(features):
return self.client.get(
reverse(
self.view, kwargs={"organization_slug": self.organization.slug, "key": key}
self.view,
kwargs={"organization_id_or_slug": self.organization.slug, "key": key},
),
format="json",
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/api/endpoints/test_organization_traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def do_request(self, query, features=None, **kwargs):
features = ["organizations:performance-trace-explorer"]
with self.feature(features):
return self.client.get(
reverse(self.view, kwargs={"organization_slug": self.organization.slug}),
reverse(self.view, kwargs={"organization_id_or_slug": self.organization.slug}),
query,
format="json",
**kwargs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def setUp(self):
def do_request(self, data, url=None, features=None):
self.url = reverse(
"sentry-api-0-organization-transaction-anomaly-detection",
kwargs={"organization_slug": self.project.organization.slug},
kwargs={"organization_id_or_slug": self.project.organization.slug},
)

if features is None:
Expand All @@ -39,7 +39,7 @@ def do_request(self, data, url=None, features=None):
def test_without_feature(self):
self.url = reverse(
"sentry-api-0-organization-transaction-anomaly-detection",
kwargs={"organization_slug": self.project.organization.slug},
kwargs={"organization_id_or_slug": self.project.organization.slug},
)

response = self.client.get(self.url, data={}, format="json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUp(self):
self.url = reverse(
"sentry-api-0-project-alert-rule-task-details",
kwargs={
"organization_slug": project1.organization.slug,
"organization_id_or_slug": project1.organization.slug,
"project_id_or_slug": project1.slug,
"task_uuid": self.uuid,
},
Expand Down
Loading

0 comments on commit 580c497

Please sign in to comment.