title: Django Rest Framework Test case issue: 'HttpResponseNotAllowed' object has no attribute 'data'
body: <p>My tests file code:</p>
  
  <pre><code>from rest_framework import status
  from rest_framework.test import APITestCase
  
  class CategoryTests(APITestCase):
  
    def test_create_create(self):
  
      url = '/category/add/'
      data = {"name":"Sports","description":"get live updates here"}
      response = self.client.post(url, data, format='json')
      self.assertEqual(response.data, data)
  </code></pre>
  
  <p>Error which I am getting:</p>
  
  <pre><code>Traceback (most recent call last):
  File "/Users/test/webapp/apps/core/tests.py", line 16, in test_create_create
  self.assertEqual(response.data, data)
  AttributeError: 'HttpResponseNotAllowed' object has no attribute 'data'
  </code></pre>
  
  <p>Infact the tests are not even calling the exact api statements(I checked that using debug statements in api code). Please let me know what may be going wrong or you need any more information on this.</p>