dp-zp-agent/test/conftest.py
2026-07-28 23:56:03 +02:00

27 lines
638 B
Python

from __future__ import annotations
import sys
from pathlib import Path
import pytest
PROJECT_ROOT = Path(__file__).resolve().parents[1]
if str(PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(PROJECT_ROOT))
@pytest.fixture(autouse=True)
def security_environment(
monkeypatch: pytest.MonkeyPatch,
) -> None:
"""Každý test dostane platnú bezpečnostnú konfiguráciu."""
monkeypatch.setenv("WEBHOOK_SECRET", "w" * 64)
monkeypatch.setenv("SYNC_API_KEY", "s" * 64)
monkeypatch.setenv(
"EXPECTED_GITEA_REPOSITORY",
"KEMT/zpwiki",
)
monkeypatch.setenv("WEBHOOK_PULL_GIT", "false")