1
2
3
4
5
6
7
8
9
10
11
12
13
"""Set test env vars before the pygitweb package is imported (see pygitweb/conftest.py)."""
from __future__ import annotations
import os
from pathlib import Path
_test_auth_config = Path(os.environ.get("TEMP", "/tmp")) / "pygitweb-test-auth.json"
_test_settings_config = Path(os.environ.get("TEMP", "/tmp")) / "pygitweb-test-settings.json"
os.environ.setdefault("PYGITWEB_AUTH", "0")
os.environ.setdefault("PYGITWEB_AUTH_CONFIG", str(_test_auth_config))
os.environ.setdefault("PYGITWEB_SETTINGS_CONFIG", str(_test_settings_config))