Spaces:
Running
Running
| import pytest | |
| from datetime import timedelta | |
| from utils.auth import create_access_token | |
| def token() -> str: | |
| """Issue a short-lived JWT for tests with necessary scopes.""" | |
| payload = { | |
| "sub": "testuser", | |
| "user_id": "00000000-0000-0000-0000-000000000000", | |
| "scopes": ["translate:read", "translate:write", "platform"], | |
| } | |
| return create_access_token(payload, expires_delta=timedelta(minutes=60)) | |