fix some tests concerning logging

This commit is contained in:
2026-10-01 17:27:29 +02:00
parent 0cb912466e
commit e78d55759c
3 changed files with 29 additions and 3 deletions
+3 -3
View File
@@ -7,10 +7,10 @@ from pathlib import Path
from unittest.mock import patch
import pytest
from pydantic import ValidationError
from uvicorn.logging import DefaultFormatter
from dataflex_backend_common.logging_config import LoggingSettings
from pydantic import ValidationError
from utils.logging_config import LoggingSettings
SECONDS_PER_DAY = 24 * 60 * 60
@@ -41,7 +41,7 @@ def test_sets_valid_log_level(restore_root_logger: None) -> None:
def test_invalid_log_level_falls_back_to_info(restore_root_logger: None) -> None:
with patch("dataflex_backend_common.logging_config.logger.error") as log_error:
with patch("utils.logging_config.logger.error") as log_error:
LoggingSettings(LOG_LEVEL="NOT_A_LEVEL", LOG_TO_FILE=False)
assert logging.getLogger().level == logging.INFO