test auth api

This commit is contained in:
IluaAir
2025-08-18 18:26:45 +03:00
parent eb5a1b9d85
commit cc3aad5c20
4 changed files with 56 additions and 23 deletions

View File

@@ -1,10 +1,10 @@
from src.core.auth_manager import AuthManager
async def test_jwt():
token = AuthManager.create_access_token(data={"id": 1, "sub": "testuser", "is_active": "True"})
token = AuthManager.create_access_token(
data={"id": 1, "sub": "testuser", "is_active": "True"}
)
assert token
encode_token = AuthManager.decode_access_token(token=token)
assert encode_token['id'] == 1 and encode_token['sub'] == 'testuser'
assert encode_token["id"] == 1 and encode_token["sub"] == "testuser"