reworked
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / application (pull_request) Canceled after 0s

This commit is contained in:
2026-11-07 11:56:38 +03:00
parent bd0b33e273
commit 8f1d7e27c7
46 changed files with 2668 additions and 35 deletions
+17
View File
@@ -0,0 +1,17 @@
import os
import time
import pytest
from client import Client
@pytest.mark.expiry
def test_session_expires(live: Client):
ttl = int(os.environ.get("SESSION_TTL_SECONDS", "3600"))
if os.environ.get("RUN_EXPIRY") != "1":
pytest.skip("set RUN_EXPIRY=1 and SESSION_TTL_SECONDS<=3")
assert ttl <= 3
actor = live.user("ttl")
live.call("GET", "/api/v1/users/me", actor=actor, schema="User")
time.sleep(ttl + 1.5)
live.call("GET", "/api/v1/users/me", 401, actor=actor)