          mixin.CONTENT = form_data
  
          response = mixin.post(request)
          self.assertEquals(1, Group.objects.count())
          self.assertEquals('foo', response.cleaned_content.name)
  
      def test_creation_with_m2m_relation(self):
          class UserResource(ModelResource):
              model = User
  
 
</s> remove         self.assertEquals(1, response.cleaned_content.groups.count())
        self.assertEquals('foo', response.cleaned_content.groups.all()[0].name)
 </s> add         self.assertEquals(1, response.raw_content.groups.count())
        self.assertEquals('foo', response.raw_content.groups.all()[0].name) </s> remove         self.assertEquals(1, response.cleaned_content.groups.count())
        self.assertEquals('foo1', response.cleaned_content.groups.all()[0].name)
 </s> add         self.assertEquals(1, response.raw_content.groups.count())
        self.assertEquals('foo1', response.raw_content.groups.all()[0].name) </s> remove         self.assertEquals(0, response.cleaned_content.groups.count())
 </s> add         self.assertEquals(0, response.raw_content.groups.count()) </s> remove         self.assertEquals(2, response.cleaned_content.groups.count())
        self.assertEquals('foo1', response.cleaned_content.groups.all()[0].name)
        self.assertEquals('foo2', response.cleaned_content.groups.all()[1].name)
 </s> add         self.assertEquals(2, response.raw_content.groups.count())
        self.assertEquals('foo1', response.raw_content.groups.all()[0].name)
        self.assertEquals('foo2', response.raw_content.groups.all()[1].name) </s> remove         raise ErrorResponse(status.HTTP_200_OK, response_obj)
 </s> add         raise ErrorResponse(content=content, status=status.HTTP_200_OK)
        self.assertEquals('foo', response.raw_content.name)
          mixin.CONTENT = form_data
  
          response = mixin.post(request)
          self.assertEquals(1, Group.objects.count())
        self.assertEquals('foo', response.raw_content.name)
  
      def test_creation_with_m2m_relation(self):
          class UserResource(ModelResource):
              model = User
  
keep keep keep keep replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/tests/mixins.py