Spaces:
Paused
Paused
File size: 588 Bytes
6049960 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import time
import pytest
from app import access
@pytest.fixture(autouse=True)
def legacy_owner_session(request, monkeypatch):
"""Pre-v0.10 tests expect projects directly under data_root: run them as the owner.
Isolation itself is covered by test_access.py (real anonymous sessions)."""
if request.module.__name__.endswith("test_access"):
return
monkeypatch.setattr(access.Sessions, "new_anonymous",
lambda self: {"kind": "hf", "user": access.OWNER, "sid": "0" * 32,
"exp": int(time.time()) + 3600})
|