Skip to content

Commit 86816e0

Browse files
committed
fix tests
1 parent bfa15b2 commit 86816e0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/logger.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ def get_logs():
4646

4747

4848
def on_flush(callback):
49-
stdout_interceptor.on_flush(callback)
50-
stderr_interceptor.on_flush(callback)
49+
if stdout_interceptor is not None:
50+
stdout_interceptor.on_flush(callback)
51+
if stderr_interceptor is not None:
52+
stderr_interceptor.on_flush(callback)
5153

5254
def setup_logger(log_level: str = 'INFO', capacity: int = 300):
5355
global logs

tests-unit/server/routes/internal_routes_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async def test_file_service_initialization():
102102
# Create a mock instance
103103
mock_file_service_instance = MagicMock(spec=FileService)
104104
MockFileService.return_value = mock_file_service_instance
105-
internal_routes = InternalRoutes()
105+
internal_routes = InternalRoutes(None)
106106

107107
# Check if FileService was initialized with the correct parameters
108108
MockFileService.assert_called_once_with({

0 commit comments

Comments
 (0)