stackchain-dashboard/tests/conftest.py
timmy 3b9f184a47
All checks were successful
CI / lint (pull_request) Successful in 3m29s
CI / build-release (pull_request) Successful in 6s
CI / browser-journey (pull_request) Successful in 7m26s
CI / release-candidate (pull_request) Has been skipped
security: scope activity journal by principal (Closes #1462)
2026-08-27 08:10:27 +00:00

26 lines
661 B
Python

"""Test-only secret injection for encrypted private state stores."""
import os
import pytest
os.environ.setdefault(
"STACKCHAIN_PRIVATE_STATE_ENCRYPTION_KEY",
"c3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3M=",
)
os.environ.setdefault(
"STACKCHAIN_PUSH_STATE_ENCRYPTION_KEY",
"cHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHA=",
)
@pytest.fixture(autouse=True)
def stable_upstream_identity(monkeypatch):
"""Keep API tests off the network when security ownership resolves identity."""
from src import main
async def current_user():
return {"id": 42, "login": "timmy"}
monkeypatch.setattr(main, "current_user", current_user)