File tree 2 files changed +10
-4
lines changed
tests/sentry/integrations/slack
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 10
10
}
11
11
12
12
13
- def get_url (organization : Organization , provider_type : str , provider : str ) -> str :
13
+ def get_url (organization : Organization , provider_type : str , name : str ) -> str :
14
14
if provider_type :
15
15
type_name = provider_types .get (provider_type , "" )
16
16
if type_name :
17
17
return str (
18
18
organization .absolute_url (
19
- f"/settings/{ type_name } /{ provider } /" ,
19
+ f"/settings/{ organization . slug } / { type_name } /{ name } /" ,
20
20
)
21
21
)
22
22
@@ -39,13 +39,14 @@ def notify_disable(
39
39
organization : Organization ,
40
40
integration_name : str ,
41
41
redis_key : str ,
42
+ integration_slug : Union [str , None ] = None ,
42
43
project : Union [str , None ] = None ,
43
44
):
44
45
45
46
integration_link = get_url (
46
47
organization ,
47
48
get_provider_type (redis_key ),
48
- integration_name ,
49
+ integration_slug if "sentry-app" in redis_key and integration_slug else integration_name ,
49
50
)
50
51
51
52
for user in organization .get_owners ():
Original file line number Diff line number Diff line change @@ -80,7 +80,12 @@ def test_email(self):
80
80
assert len (mail .outbox ) == 1
81
81
msg = mail .outbox [0 ]
82
82
assert msg .subject == "Action required: re-authenticate or fix your Slack integration"
83
- assert (f"/settings/integrations/{ self .integration .provider } " ) in msg .body
83
+ assert (
84
+ self .organization .absolute_url (
85
+ f"/settings/{ self .organization .slug } /integrations/{ self .integration .provider } "
86
+ )
87
+ in msg .body
88
+ )
84
89
85
90
@responses .activate
86
91
def test_fatal_integration (self ):
You can’t perform that action at this time.
0 commit comments