fix some tests concerning logging
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user