Skip to content

Commit 14ea238

Browse files
fix: update test to reflect where= removal from event expressions
The test_event_with_custom_filter test expected where= in the generated expression, but we intentionally removed that since where_predicate is not implemented. Updated test to verify where= is NOT generated.
1 parent 69b2dc0 commit 14ea238

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

spp_cel_event/tests/test_cel_variable_event_agg.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,13 @@ def test_event_all_states(self):
220220
variable.cel_expression,
221221
)
222222

223-
def test_event_with_custom_filter(self):
224-
"""Test CEL expression with custom aggregate_filter."""
223+
def test_event_with_custom_filter_ignored(self):
224+
"""Test that aggregate_filter is not included in generated event expression.
225+
226+
The where_predicate feature is not implemented in the executor, so
227+
aggregate_filter is intentionally excluded from the generated CEL
228+
expression to avoid silently wrong results.
229+
"""
225230
variable = self.CELVariable.create(
226231
{
227232
"name": "test_large_payments",
@@ -236,7 +241,9 @@ def test_event_with_custom_filter(self):
236241
"aggregate_filter": "e.amount > 1000",
237242
}
238243
)
239-
self.assertIn("where='e.amount > 1000'", variable.cel_expression)
244+
# where= should NOT be in the expression since where_predicate is not implemented
245+
self.assertNotIn("where=", variable.cel_expression)
246+
self.assertEqual(variable.cel_expression, "events_sum('payment', 'amount')")
240247

241248
def test_event_aggregation_without_type_raises_validation(self):
242249
"""Test that missing event type raises ValidationError."""

0 commit comments

Comments
 (0)