          }
          self.assertEqual(response.status_code, status.HTTP_200_OK)
          self.assertEqual(response.data, expected)
  
      def test_put_cannot_set_id(self):
          """
          PUT requests to create a new object should not be able to set the id.
          """
 
</s> remove from django.shortcuts import get_object_or_404
 </s> add from django.shortcuts import get_object_or_404 as _get_object_or_404
    def test_get_instance_view_incorrect_arg(self):
        """
        GET requests with an incorrect pk type, should raise 404, not 500.
        Regression test for #890.
        """
        request = factory.get('/a')
        with self.assertNumQueries(0):
            response = self.view(request, pk='a').render()
        self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)

          }
          self.assertEqual(response.status_code, status.HTTP_200_OK)
          self.assertEqual(response.data, expected)
  
    def test_get_instance_view_incorrect_arg(self):
        """
        GET requests with an incorrect pk type, should raise 404, not 500.
        Regression test for #890.
        """
        request = factory.get('/a')
        with self.assertNumQueries(0):
            response = self.view(request, pk='a').render()
        self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)

      def test_put_cannot_set_id(self):
          """
          PUT requests to create a new object should not be able to set the id.
          """
keep keep keep add keep keep keep keep
 Raise 404 on incorrect lookup type in URL, not 500. Closes #890. 
rest_framework/tests/generics.py