flavors / django-graphql-jwt

JSON Web Token (JWT) authentication for Graphene Django

Home Page:https://django-graphql-jwt.domake.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test client (graphql_jwt.testcases.JSONWebTokenClient) `self.client.get` returns WSGIRequest instead of Response

weilu opened this issue · comments

The use case is being able to issue regular get requests using the test client as in Django test case.

Here's a quick example to replicate the issue:

class GraphQLAPITestCase(JSONWebTokenTestCase):
       def test_graphql_ui(self):
              response = self.client.get('/graphql/', HTTP_ACCEPT='text/html')
              print(response) # <WSGIRequest: GET '/graphql/'>

I'd expect response to be a Response instance – not sure why it's a WSGIRequest. Any idea?