improvements to router, y tests
This commit is contained in:
@@ -2,9 +2,17 @@ import logging
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
from rest_framework_simplejwt.tokens import RefreshToken
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
def get_tokens_for_user(user):
|
||||
refresh = RefreshToken.for_user(user)
|
||||
|
||||
return {
|
||||
'refresh': str(refresh),
|
||||
'access': str(refresh.access_token),
|
||||
}
|
||||
|
||||
def get_auth_token(client, email, password):
|
||||
credentials = {
|
||||
|
||||
Reference in New Issue
Block a user