Some checks failed
CI / Lint (ruff) (push) Successful in 12s
CI / SAST (bandit) (push) Successful in 13s
CI / Dependency audit (pip-audit) (push) Successful in 22s
CI / Test (Standard) (3.11) (push) Failing after 54s
CI / Test (Standard) (3.12) (push) Successful in 1m35s
CI / Test (Live) (3.11) (push) Has been skipped
CI / Test (Fuzz) (3.11) (push) Has been skipped
CI / Merge dev → testing (push) Has been skipped
CI / Prepare Merge to Main (push) Has been skipped
CI / Finalize Merge to Main (push) Has been skipped
21 lines
649 B
Python
21 lines
649 B
Python
"""
|
|
Shared pytest configuration.
|
|
|
|
Env vars required by decnet.env must be set here, at module level, before
|
|
any test file imports decnet.* — pytest loads conftest.py first.
|
|
"""
|
|
import os
|
|
|
|
os.environ["DECNET_JWT_SECRET"] = "stable-test-secret-key-at-least-32-chars-long"
|
|
os.environ["DECNET_ADMIN_PASSWORD"] = "test-password-123"
|
|
os.environ["DECNET_DEVELOPER"] = "true"
|
|
os.environ["DECNET_DB_TYPE"] = "sqlite"
|
|
|
|
import pytest
|
|
from typing import Any
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def standardize_auth_secret(monkeypatch: Any) -> None:
|
|
import decnet.web.auth
|
|
monkeypatch.setattr(decnet.web.auth, "SECRET_KEY", os.environ["DECNET_JWT_SECRET"])
|