26 lines
661 B
Python
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) |