Реализовать ЛР 4 на 3: приватное S3 и вложения — Гавриленко БПИ2303

This commit is contained in:
2026-11-13 01:54:11 +03:00
parent ec540a1a72
commit 53ea5b2faf
34 changed files with 1377 additions and 35 deletions
+15
View File
@@ -0,0 +1,15 @@
"""Run against an API started with SESSION_TTL_SECONDS=2; tokens never printed."""
import sys
import time
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests'))
from client import Client, arguments
args = arguments('Short-TTL session expiry')
c = Client(args.base_url, args.ca_file)
a = c.user('expiry')
c.call('GET', '/api/v1/users/me', actor=a, schema='User')
time.sleep(3)
c.call('GET', '/api/v1/users/me', 401, actor=a)
c.call('DELETE', '/api/v1/auth/sessions/current', 401, actor=a)
print('PASS: session expires with TTL=2; expired token cannot read or logout')