Skip to content

Commit

Permalink
dummy commit
Browse files Browse the repository at this point in the history
  • Loading branch information
scefali committed Aug 18, 2024
1 parent bacdd59 commit a460308
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions tests/sentry/api/endpoints/test_sentry_app_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,6 @@ def test_add_service_hooks_and_update_scope(self):
self.published_app.save()

# for published integrations, it runs in a task
print(
"start test with organization ids: ",
org1.id,
org2.id,
"and application id: ",
self.published_app.application_id,
)
with self.tasks(), outbox_runner():
self.get_success_response(
self.published_app.slug,
Expand All @@ -308,9 +301,6 @@ def test_add_service_hooks_and_update_scope(self):
events=("issue",),
status_code=200,
)
print(
f"task and outbox runner should be done by now with organization ids: {org1.id}, {org2.id}, application id: {self.published_app.application_id}"
)
self.published_app.refresh_from_db()
assert set(self.published_app.scope_list) == {"event:write", "event:read"}
assert (
Expand All @@ -325,15 +315,11 @@ def test_add_service_hooks_and_update_scope(self):
organization_id=org2.id, application_id=self.published_app.application_id
)

assert (
len(service_hooks_org1) > 0
), f"No service hooks found for Org1 (ID: {org1.id}), App ID: {self.published_app.application_id}"
assert (
len(service_hooks_org2) > 0
), f"No service hooks found for Org2 (ID: {org2.id}), App ID: {self.published_app.application_id}"
assert len(service_hooks_org1) > 0, f"No service hooks found for Org1 (ID: {org1.id})"
assert len(service_hooks_org2) > 0, f"No service hooks found for Org2 (ID: {org2.id})"

for hook in service_hooks_org1:
assert hook.application_id == self.published_app.id
assert hook.application_id == self.published_app.application_id
assert hook.organization_id == org1.id
assert hook.actor_id == installation1.id
assert hook.url == "https://newurl.com"
Expand All @@ -347,7 +333,7 @@ def test_add_service_hooks_and_update_scope(self):
assert hook.project_id is None

for hook in service_hooks_org2:
assert hook.application_id == self.published_app.id
assert hook.application_id == self.published_app.application_id
assert hook.organization_id == org2.id
assert hook.actor_id == installation2.id
assert hook.url == "https://newurl.com"
Expand Down

0 comments on commit a460308

Please sign in to comment.