def setUp(self):
    self.test_user = UserModel.objects.create_user('test_user',
        'test@user.com', '123456')
self.application = Application(name='Test Application', redirect_uris=
    'http://localhost', user=self.test_user, client_type=Application.
    CLIENT_CONFIDENTIAL, authorization_grant_type=Application.
    GRANT_AUTHORIZATION_CODE)
self.application.save()

def test_revoke_access_token(self):
    pass
How to test an API endpoint with Django-rest-framework using Django-oauth-toolkit for authentication