@@ -142,10 +142,12 @@ def test_comparison_alert_above(self, helper_metrics):
142
142
143
143
for i in range (4 ):
144
144
self .store_event (
145
- data = {"timestamp" : (comparison_date - timedelta (minutes = 30 + i )).isoformat ()},
145
+ data = {
146
+ "timestamp" : (comparison_date - timedelta (minutes = 30 + i )).isoformat (),
147
+ "environment" : self .environment .name ,
148
+ },
146
149
project_id = self .project .id ,
147
150
)
148
-
149
151
self .metrics .incr .reset_mock ()
150
152
self .send_update (2 , timedelta (minutes = - 9 ))
151
153
# Shouldn't trigger, since there are 4 events in the comparison period, and 2/4 == 50%
@@ -189,7 +191,10 @@ def test_comparison_alert_below(self, helper_metrics):
189
191
190
192
for i in range (4 ):
191
193
self .store_event (
192
- data = {"timestamp" : (comparison_date - timedelta (minutes = 30 + i )).isoformat ()},
194
+ data = {
195
+ "timestamp" : (comparison_date - timedelta (minutes = 30 + i )).isoformat (),
196
+ "environment" : self .environment .name ,
197
+ },
193
198
project_id = self .project .id ,
194
199
)
195
200
@@ -240,6 +245,7 @@ def test_is_unresolved_comparison_query(self, helper_metrics):
240
245
for i in range (4 ):
241
246
data = {
242
247
"timestamp" : (comparison_date - timedelta (minutes = 30 + i )).isoformat (),
248
+ "environment" : self .environment .name ,
243
249
"stacktrace" : copy .deepcopy (DEFAULT_EVENT_DATA ["stacktrace" ]),
244
250
"fingerprint" : ["group2" ],
245
251
"level" : "error" ,
@@ -302,6 +308,7 @@ def test_is_unresolved_different_aggregate(self, helper_metrics):
302
308
self .store_event (
303
309
data = {
304
310
"timestamp" : (comparison_date - timedelta (minutes = 30 + i )).isoformat (),
311
+ "environment" : self .environment .name ,
305
312
"tags" : {"sentry:user" : i },
306
313
},
307
314
project_id = self .project .id ,
0 commit comments