Skip to content

Commit b07c5b3

Browse files
test: update event tracking test to verify callable mock integration
1 parent da96959 commit b07c5b3

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

src/tests/backend/v4/common/services/test_plan_service.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -530,17 +530,11 @@ async def test_static_method_properties(self):
530530
assert result is False
531531

532532
def test_event_tracking_calls(self):
533-
"""Test that event tracking is called appropriately."""
534-
# This test verifies the event tracking integration
535-
with patch.object(mock_event_utils, 'track_event_if_configured') as mock_track:
536-
mock_approval = MockPlanApprovalResponse(
537-
plan_id="test-plan",
538-
m_plan_id="test-m-plan",
539-
approved=True
540-
)
541-
542-
# The actual event tracking calls are tested indirectly through the service methods
543-
assert mock_track is not None
533+
"""Test that event tracking is callable via the mocked event_utils module."""
534+
# Verify the mock event_utils has the track function accessible
535+
assert callable(mock_event_utils.track_event_if_configured)
536+
# Verify the plan_service module imported it (may be a mock attribute)
537+
assert hasattr(plan_service_module, 'track_event_if_configured')
544538

545539
def test_logging_integration(self):
546540
"""Test that logging is properly configured."""

0 commit comments

Comments
 (0)