49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
import pytest
|
|
|
|
from orc_renaming.config import AppConfig
|
|
|
|
|
|
@pytest.fixture
|
|
def config(monkeypatch: pytest.MonkeyPatch, tmp_path: Any) -> AppConfig:
|
|
monkeypatch.setenv("TEST_NEXTCLOUD_PASSWORD", "secret")
|
|
return AppConfig.model_validate(
|
|
{
|
|
"nextcloud": {
|
|
"webdav_url": "https://cloud.example/remote.php/dav/files/test",
|
|
"username": "test",
|
|
"password_env": "TEST_NEXTCLOUD_PASSWORD",
|
|
"input_folder": "/Scanner/Eingang",
|
|
"output_folder": "/Scanner/Eingang/umbenannt",
|
|
"review_folder": "/Scanner/Eingang/manuell-pruefen",
|
|
"archive_folder": "/Scanner/Eingang/verarbeitet-originale",
|
|
},
|
|
"ollama": {"enabled": False},
|
|
"processing": {
|
|
"state_directory": str(tmp_path / "state"),
|
|
"work_directory": str(tmp_path / "work"),
|
|
},
|
|
"companies": [
|
|
{
|
|
"name": "Stadtwerke-Musterstadt",
|
|
"aliases": ["Stadtwerke Musterstadt GmbH"],
|
|
}
|
|
],
|
|
"properties": [
|
|
{
|
|
"id": "WH1",
|
|
"name": "Wohnhaus",
|
|
"markers": [
|
|
"Musterstraße 12",
|
|
"Vertragskonto 47110815",
|
|
],
|
|
}
|
|
],
|
|
"private_markers": ["Privatweg 8"],
|
|
}
|
|
)
|
|
|