fix tests

This commit is contained in:
pythongosssss 2024-10-29 20:06:12 +00:00
parent bfa15b2559
commit 86816e07ca
2 changed files with 5 additions and 3 deletions

View File

@ -46,8 +46,10 @@ def get_logs():
def on_flush(callback):
stdout_interceptor.on_flush(callback)
stderr_interceptor.on_flush(callback)
if stdout_interceptor is not None:
stdout_interceptor.on_flush(callback)
if stderr_interceptor is not None:
stderr_interceptor.on_flush(callback)
def setup_logger(log_level: str = 'INFO', capacity: int = 300):
global logs

View File

@ -102,7 +102,7 @@ async def test_file_service_initialization():
# Create a mock instance
mock_file_service_instance = MagicMock(spec=FileService)
MockFileService.return_value = mock_file_service_instance
internal_routes = InternalRoutes()
internal_routes = InternalRoutes(None)
# Check if FileService was initialized with the correct parameters
MockFileService.assert_called_once_with({