|
|
|
# JWT Token
|
|
|
|
def test_encode_auth_token():
|
|
|
|
"""Test JWT token encoding"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def test_decode_auth_token():
|
|
|
|
"""Test JWT token decode"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
# Register
|
|
|
|
|
|
|
|
def test_registration():
|
|
|
|
""" Test for user registration """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def test_registered_with_already_registered_user():
|
|
|
|
""" Test registration with already registered email"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def test_registered_user_login():
|
|
|
|
""" Test for login of registered-user login """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def test_non_registered_user_login():
|
|
|
|
""" Test for login of non-registered user """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
# Test Login
|
|
|
|
|
|
|
|
def test_registered_user_login():
|
|
|
|
""" Test for login of registered-user login """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def test_non_registered_user_login():
|
|
|
|
""" Test for login of non-registered user """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
# Test Logout
|
|
|
|
|
|
|
|
def test_valid_logout():
|
|
|
|
""" Test for logout before token expires """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def test_invalid_logout():
|
|
|
|
""" Testing logout after the token expires """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
# User status
|
|
|
|
|
|
|
|
def test_user_status():
|
|
|
|
""" Test for user status """
|
|
|
|
|
|
|
|
|
|
|
|
"""In order to get the user details of the currently logged in user, the auth token must be sent with the request within the header."""
|
|
|
|
|
|
|
|
|
|
|
|
def test_user_status_malformed_bearer_token():
|
|
|
|
""" Test for user status with malformed bearer token"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
# Blacklist
|
|
|
|
|
|
|
|
def test_valid_blacklisted_token_logout():
|
|
|
|
""" Test for logout after a valid token gets blacklisted """
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def test_valid_blacklisted_token_user():
|
|
|
|
""" Test for user status with a blacklisted valid token """
|