File tree 1 file changed +11
-3
lines changed
tests/sentry/api/endpoints
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
import copy
2
+ from unittest .mock import patch
2
3
from urllib .parse import urlencode
3
4
4
5
from sentry .eventstream .snuba import SnubaEventStream
@@ -94,7 +95,7 @@ def test_return_multiple_hashes(self):
94
95
def test_unmerge (self ):
95
96
self .login_as (user = self .user )
96
97
97
- group = self .create_group ()
98
+ group = self .create_group (platform = "javascript" )
98
99
99
100
hashes = [
100
101
GroupHash .objects .create (project = group .project , group = group , hash = hash )
@@ -108,5 +109,12 @@ def test_unmerge(self):
108
109
]
109
110
)
110
111
111
- response = self .client .delete (url , format = "json" )
112
- assert response .status_code == 202 , response .content
112
+ with patch ("sentry.api.endpoints.group_hashes.metrics.incr" ) as mock_metrics_incr :
113
+ response = self .client .delete (url , format = "json" )
114
+
115
+ assert response .status_code == 202 , response .content
116
+ mock_metrics_incr .assert_any_call (
117
+ "grouping.unmerge_issues" ,
118
+ sample_rate = 1.0 ,
119
+ tags = {"platform" : "javascript" },
120
+ )
You can’t perform that action at this time.
0 commit comments