19 lines
495 B
Python
19 lines
495 B
Python
|
|
"""Tests for logging configuration."""
|
||
|
|
|
||
|
|
from types import SimpleNamespace
|
||
|
|
|
||
|
|
import atocore.config as config
|
||
|
|
from atocore.observability.logger import setup_logging
|
||
|
|
|
||
|
|
|
||
|
|
def test_setup_logging_uses_dynamic_settings_without_name_error():
|
||
|
|
original_settings = config.settings
|
||
|
|
try:
|
||
|
|
config.settings = SimpleNamespace(debug=False)
|
||
|
|
setup_logging()
|
||
|
|
|
||
|
|
config.settings = SimpleNamespace(debug=True)
|
||
|
|
setup_logging()
|
||
|
|
finally:
|
||
|
|
config.settings = original_settings
|