@@ -42,6 +42,9 @@ def test_default_fields(self):
4242 assert event .tag is None
4343 assert event .filter_key is None
4444 assert event .object is None
45+ assert event .model_flags > 0
46+ assert event .is_model_visible () is True
47+ assert event .is_summary_event () is False
4548
4649 def test_auto_generated_id_is_valid_uuid (self ):
4750 event = Event (invocation_id = "inv-1" , author = "a" )
@@ -308,6 +311,33 @@ def test_error_message_without_code_not_error(self):
308311 assert event .is_error () is False
309312
310313
314+ # ---------------------------------------------------------------------------
315+ # Event model visibility / summary flags
316+ # ---------------------------------------------------------------------------
317+
318+
319+ class TestEventModelFlags :
320+ def test_set_model_visible_false (self ):
321+ event = Event (invocation_id = "inv-1" , author = "a" )
322+ event .set_model_visible (False )
323+ assert event .is_model_visible () is False
324+
325+ def test_visible_field_does_not_control_model_visibility (self ):
326+ event = Event (invocation_id = "inv-1" , author = "a" , visible = False )
327+ assert event .is_model_visible () is True
328+
329+ def test_set_summary_event_true (self ):
330+ event = Event (invocation_id = "inv-1" , author = "a" )
331+ event .set_summary_event (True )
332+ assert event .is_summary_event () is True
333+
334+ def test_clear_summary_event (self ):
335+ event = Event (invocation_id = "inv-1" , author = "a" )
336+ event .set_summary_event (True )
337+ event .set_summary_event (False )
338+ assert event .is_summary_event () is False
339+
340+
311341# ---------------------------------------------------------------------------
312342# Event.has_trailing_code_execution_result
313343# ---------------------------------------------------------------------------
0 commit comments