mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-21 23:53:55 +02:00
Repaired the SQL copy and reduced the log volume a bit (#141)
- Added a cli interface to the SQL copy - Repaired the SQL copy function - Added the SQL copy function to the scripts - Reduced the logging verbosity
This commit is contained in:
26
tests/utils/logger_config_test.py
Normal file
26
tests/utils/logger_config_test.py
Normal file
@ -0,0 +1,26 @@
|
||||
"""Smoke-test over the logger config."""
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from aki_prj23_transparenzregister.utils.logger_config import configer_logger
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path", [None, "test-log.log", ""])
|
||||
@pytest.mark.parametrize("upper", [True, False])
|
||||
@pytest.mark.parametrize("level", ["info", "debug", "error", "warning"])
|
||||
def test_configer_logger(
|
||||
level: str,
|
||||
upper: bool,
|
||||
path: Path | str | None,
|
||||
) -> None:
|
||||
"""Tests the configuration of the logger.
|
||||
|
||||
Args:
|
||||
level: The log-level to configure.
|
||||
upper: If the upper variant of the level should be used.
|
||||
path: The path where to save the log.
|
||||
"""
|
||||
if level.upper():
|
||||
level = level.upper()
|
||||
configer_logger(level, path) # type: ignore
|
Reference in New Issue
Block a user