          updated = self.objects.get(id=1)
          self.assertEquals(updated.text, 'foobar')
  
      def test_delete_instance_view(self):
          """
          DELETE requests to RetrieveUpdateDestroyAPIView should delete an object.
          """
 
</s> remove     def get_serializer(self, instance=None, data=None, files=None):
 </s> add     def get_serializer(self, instance=None, data=None, files=None, partial=False): </s> remove     def update(self, request, *args, **kwargs):
 </s> add     def update(self, request, partial=False, *args, **kwargs): </s> remove         return self.update(request, *args, **kwargs)
 </s> add         return self.update(request, partial=False, *args, **kwargs)


class ParitalUpdateAPIView(mixins.UpdateModelMixin,
                            SingleObjectAPIView):

    """
    Concrete view for paritally updating a model instance.
    """
    def patch(self, request, *args, **kwargs):
        return self.update(request, partial=True, *args, **kwargs) </s> remove         return serializer_class(instance, data=data, files=files, context=context)
 </s> add         return serializer_class(instance, data=data, files=files, partial=partial, context=context) </s> remove         return self.update(request, *args, **kwargs)
 </s> add         return self.update(request, partial=False, *args, **kwargs)

    def delete(self, request, *args, **kwargs):
        return self.destroy(request, *args, **kwargs)


class RetrievePartialUpdateDestroyAPIView(mixins.RetrieveModelMixin,
                                          mixins.UpdateModelMixin,
                                          mixins.DestroyModelMixin,
                                          SingleObjectAPIView):

    """
    Concrete view for retrieving, updating via PATCH (partial) or PUT (full),
    or deleting a model instance.
    """
    def get(self, request, *args, **kwargs):
        return self.retrieve(request, *args, **kwargs)

    def put(self, request, *args, **kwargs):
        return self.update(request, partial=False, *args, **kwargs)

    def patch(self, request, *args, **kwargs):
        return self.update(request, partial=True, *args, **kwargs)
    # def test_patch_instance_view(self):
    #     """
    #     PATCH requests to RetrieveUpdateDestroyAPIView should update an object.
    #     """
    #     content = {'text': 'foobar'}
    #     request = factory.patch('/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')

          updated = self.objects.get(id=1)
          self.assertEquals(updated.text, 'foobar')
  
    # def test_patch_instance_view(self):
    #     """
    #     PATCH requests to RetrieveUpdateDestroyAPIView should update an object.
    #     """
    #     content = {'text': 'foobar'}
    #     request = factory.patch('/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_delete_instance_view(self):
          """
          DELETE requests to RetrieveUpdateDestroyAPIView should delete an object.
          """
keep keep add keep keep keep keep
 Adding PATCH support to Django REST Framework 
rest_framework/tests/generics.py