Files
taskncoffee/tests/unit_tests/test_auth_jwt.py
2025-08-17 12:55:41 +03:00

11 lines
326 B
Python

from src.core.auth_manager import AuthManager
async def test_jwt():
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'