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:
2023-09-24 15:11:49 +02:00
committed by GitHub
parent d9ca808efa
commit 820fb3e52b
12 changed files with 239 additions and 97 deletions

View 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