          content = {'text': 'foobar'}
          request = factory.put('/1', json.dumps(content),
                                content_type='application/json')
          response = self.view(request, pk=1).render()
          self.assertEquals(response.status_code, status.HTTP_200_OK)
          self.assertEquals(response.data, {'id': 1, 'text': 'foobar'})
          updated = self.objects.get(id=1)
          self.assertEquals(updated.text, 'foobar')
  
      def test_put_as_create_on_id_based_url(self):
 
</s> remove         self.assertEquals(response.status_code, status.HTTP_200_OK)
 </s> add         self.assertEquals(response.status_code, status.HTTP_201_CREATED) </s> remove         self.assertEquals(response.status_code, status.HTTP_200_OK)
 </s> add         self.assertEquals(response.status_code, status.HTTP_201_CREATED) </s> remove             return Response(serializer.data)
 </s> add             return Response(serializer.data, status=success_status)
        self.assertEquals(response.status_code, status.HTTP_201_CREATED)
          content = {'text': 'foobar'}
          request = factory.put('/1', json.dumps(content),
                                content_type='application/json')
          response = self.view(request, pk=1).render()
        self.assertEquals(response.status_code, status.HTTP_201_CREATED)
          self.assertEquals(response.data, {'id': 1, 'text': 'foobar'})
          updated = self.objects.get(id=1)
          self.assertEquals(updated.text, 'foobar')
  
      def test_put_as_create_on_id_based_url(self):
keep keep keep keep replace keep keep keep keep keep
 PUT as create should return 201.  Fixes #340. 
rest_framework/tests/generics.py