Skip to content

Commit 7f5d117

Browse files
committed
fix tests
1 parent 5bf6ed3 commit 7f5d117

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/sentry/incidents/subscription_processor/test_subscription_processor_aci.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,12 @@ def test_comparison_alert_above(self, helper_metrics):
142142

143143
for i in range(4):
144144
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+
},
146149
project_id=self.project.id,
147150
)
148-
149151
self.metrics.incr.reset_mock()
150152
self.send_update(2, timedelta(minutes=-9))
151153
# 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):
189191

190192
for i in range(4):
191193
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+
},
193198
project_id=self.project.id,
194199
)
195200

@@ -240,6 +245,7 @@ def test_is_unresolved_comparison_query(self, helper_metrics):
240245
for i in range(4):
241246
data = {
242247
"timestamp": (comparison_date - timedelta(minutes=30 + i)).isoformat(),
248+
"environment": self.environment.name,
243249
"stacktrace": copy.deepcopy(DEFAULT_EVENT_DATA["stacktrace"]),
244250
"fingerprint": ["group2"],
245251
"level": "error",
@@ -302,6 +308,7 @@ def test_is_unresolved_different_aggregate(self, helper_metrics):
302308
self.store_event(
303309
data={
304310
"timestamp": (comparison_date - timedelta(minutes=30 + i)).isoformat(),
311+
"environment": self.environment.name,
305312
"tags": {"sentry:user": i},
306313
},
307314
project_id=self.project.id,

0 commit comments

Comments
 (0)