          content = {'text': 'foobar'}
          request = factory.put('/test_slug', json.dumps(content),
                                content_type='application/json')
          response = self.slug_based_view(request, slug='test_slug').render()
          self.assertEquals(response.status_code, status.HTTP_200_OK)
          self.assertEquals(response.data, {'slug': 'test_slug', 'text': 'foobar'})
          new_obj = SlugBasedModel.objects.get(slug='test_slug')
          self.assertEquals(new_obj.text, 'foobar')
  
  
 
</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('/test_slug', json.dumps(content),
                                content_type='application/json')
          response = self.slug_based_view(request, slug='test_slug').render()
        self.assertEquals(response.status_code, status.HTTP_201_CREATED)
          self.assertEquals(response.data, {'slug': 'test_slug', 'text': 'foobar'})
          new_obj = SlugBasedModel.objects.get(slug='test_slug')
          self.assertEquals(new_obj.text, 'foobar')
  
  
keep keep keep keep replace keep keep keep keep keep
 PUT as create should return 201.  Fixes #340. 
rest_framework/tests/generics.py