add jwt check
This commit is contained in:
10
tests/unit_tests/test_auth_jwt.py
Normal file
10
tests/unit_tests/test_auth_jwt.py
Normal file
@@ -0,0 +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"})
|
||||
assert token
|
||||
encode_token = AuthManager.decode_access_token(token=token)
|
||||
assert encode_token['id'] == 1 and encode_token['sub'] == 'testuser'
|
||||
|
||||
Reference in New Issue
Block a user