Skip to content

Commit

Permalink
chore(billing): Update slack test helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
dashed committed Jun 3, 2024
1 parent 251c09d commit d769ae1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/sentry/testutils/helpers/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,20 @@ def get_block_kit_preview_url(index=0) -> str:
return preview_url


def setup_slack_with_identities(organization, user):
integration = install_slack(organization)
idp = IdentityProvider.objects.create(type="slack", external_id="TXXXXXXX1", config={})
def setup_slack_with_identities(
organization: Organization,
user: User,
identity_provider_external_id="TXXXXXXX1",
identity_external_id="UXXXXXXX1",
):
integration = install_slack(
organization=organization, workspace_id=identity_provider_external_id
)
idp = IdentityProvider.objects.create(
type="slack", external_id=identity_provider_external_id, config={}
)
Identity.objects.create(
external_id="UXXXXXXX1",
external_id=identity_external_id,
idp=idp,
user=user,
status=IdentityStatus.VALID,
Expand Down

0 comments on commit d769ae1

Please sign in to comment.