Skip to content

Commit b7072f2

Browse files
fix(langfuse): replace MagicMock with Mock to prevent RAM exhaustion (#2543) (#2798)
Co-authored-by: David S. Batista <dsbatista@gmail.com>
1 parent 0a0fd32 commit b7072f2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

integrations/langfuse/tests/test_tracer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def test_initialization(self):
568568
assert tracer._public
569569

570570
def test_create_new_span(self):
571-
mock_raw_span = MagicMock()
571+
mock_raw_span = Mock()
572572
mock_raw_span.operation_name = "operation_name"
573573
mock_raw_span.metadata = {"tag1": "value1", "tag2": "value2"}
574574

@@ -586,7 +586,7 @@ def test_create_new_span(self):
586586
mock_span_instance.get_data.return_value = {}
587587
mock_span_instance._context_manager = mock_context_manager
588588

589-
mock_tracer = MagicMock()
589+
mock_tracer = Mock()
590590
mock_tracer.start_as_current_span.return_value = mock_context_manager
591591
mock_tracer.start_as_current_observation.return_value = mock_context_manager
592592

0 commit comments

Comments
 (0)