I am using django-rest-auth for authentication and using token provided by it for authorization. I have use some permission_class also provided by django-rest. I have folloging in views.py before my each methods.
views.py
@api_view(['GET'])
@authentication_classes((TokenAuthentication))
@permission_classes((permissions.IsAuthenticated,))
How can I authenticate to access that methods inside views.py while testing those api. Because without authentication it gives 403 forbidden. How can I mock the authentication in test.