title: How to send data in GET request in django rest api test
body: <p>There are &quot;Consultant&quot; and &quot;Price&quot; tables in DB and &quot;Price&quot; has a foreign key to &quot;Consultant&quot;. I want to get all price records that are related to specific consultant. But I get an error when I use <code>APITestCase</code> to send GET request.</p>
  <p>views.py:</p>
  <pre><code>class PriceAPI(APIView):
      serializer_class = PriceSerializer
      def get(self, request):
          consultant_type = request.data.get('type', None)
          try:
              consultant = Consultant.objects.get(user=request.user, type=consultant_type)
          except Consultant.DoesNotExist:
              return Response(status=status.HTTP_406_NOT_ACCEPTABLE)
          try:
              serializer = self.serializer_class(consultant.prices, many=True)
              return Response(serializer.data, status=status.HTTP_200_OK)
          except:
              return Response(status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  <p>test.py:</p>
  <pre><code>class PriceTest(APITestCase):
      def setUp(self):
          ###
      def test_get_delete_price(self):
          response = self.client.get(
              reverse('price'),
              data=json.dumps(
                  {'type': 'sports'}),
              content_type='application/json'
          )
          self.assertEqual(response.status_code, status.HTTP_200_OK)
  </code></pre>
  <p>I get this error:</p>
  <pre><code>Error
  Traceback (most recent call last):
    File &quot;D:\programming\Pycharm\Projects\Django Projects\CAPP\capp_api\tests.py&quot;, line 394, in test_get_delete_price
      content_type='application/json'
    File &quot;D:\programming\Pycharm\Projects\Django Projects\CAPP\venv\lib\site-packages\rest_framework\test.py&quot;, line 286, in get
      response = super().get(path, data=data, **extra)
    File &quot;D:\programming\Pycharm\Projects\Django Projects\CAPP\venv\lib\site-packages\rest_framework\test.py&quot;, line 194, in get
      'QUERY_STRING': urlencode(data or {}, doseq=True),
    File &quot;D:\programming\Pycharm\Projects\Django Projects\CAPP\venv\lib\site-packages\django\utils\http.py&quot;, line 113, in urlencode
      for key, value in query:
  ValueError: not enough values to unpack (expected 2, got 1)
  </code></pre>
  <p>This error is about data that is sent in request. How can I do that in GET request?</p>