improvements to router, y tests

This commit is contained in:
Sam
2021-01-22 12:33:59 +00:00
parent 6c3ff8f1fa
commit 2b46d01369
8 changed files with 118 additions and 285 deletions

View File

@@ -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 = {