def test_ask_linking(self, sign): sign.return_value = "signed_parameters" resp = self.post_webhook(slack_user={"id": "invalid-id", "domain": "example"}) associate_url = build_linking_url( self.integration, self.org, "invalid-id", "C065W1189", self.response_url ) assert resp.status_code == 200, resp.content assert resp.data["response_type"] == "ephemeral" assert resp.data["text"] == LINK_IDENTITY_MESSAGE.format(associate_url=associate_url)
def test_ask_linking(self): resp = self.post_webhook(slack_user={ 'id': 'invalid-id', 'domain': 'example', }) associate_url = build_linking_url(self.integration, self.org, 'invalid-id', 'C065W1189') assert resp.status_code == 200, resp.content assert resp.data['response_type'] == 'ephemeral' assert resp.data['text'] == LINK_IDENTITY_MESSAGE.format( associate_url=associate_url, )
def test_ask_linking(self): resp = self.post_webhook(slack_user={ 'id': 'invalid-id', 'domain': 'example', }) associate_url = absolute_uri(reverse('sentry-account-associate-identity', kwargs={ 'organization_slug': self.org.slug, 'provider_key': 'slack', })) assert resp.status_code == 200, resp.content assert resp.data['response_type'] == 'ephemeral' assert resp.data['text'] == LINK_IDENTITY_MESSAGE.format( associate_url=associate_url, )
def test_ask_linking(self, sign): sign.return_value = 'signed_parameters' resp = self.post_webhook(slack_user={ 'id': 'invalid-id', 'domain': 'example', }) associate_url = build_linking_url( self.integration, self.org, 'invalid-id', 'C065W1189', self.response_url ) assert resp.status_code == 200, resp.content assert resp.data['response_type'] == 'ephemeral' assert resp.data['text'] == LINK_IDENTITY_MESSAGE.format( associate_url=associate_url, )