          request = self.factory.get('/')
          for dummy in range(4):
              response = MockView.as_view()(request)
          self.assertEqual(503, response.status_code)
          time.sleep(1)
          response = MockView.as_view()(request)
          self.assertEqual(200, response.status_code)
          
      def ensure_is_throttled(self, view, expect):
          request = self.factory.get('/')
 
</s> remove         """Ensure request rate is only limited per user, not globally for PerUserTrottles"""
 </s> add         """Ensure request rate is only limited per user, not globally for PerUserThrottles""" </s> remove 
    def test_raises_no_resource_found(self):
        """Ensure an Exception is raised when someone sets at per-resource throttle
        on a view with no resource set."""
        request = self.factory.get('/')
        view = MockView2.as_view()
        self.assertRaises(ConfigurationException, view, request)
        
 </s> add  </s> remove         """On success calls `throttle_success`. On failure calls `throttle_failure`. """
 </s> add         """
        Implement the check to see if the request should be throttled.

        On success calls :meth:`throttle_success`.
        On failure calls :meth:`throttle_failure`.
        """ </s> remove         return 'throttle_%s' % ident
 </s> add         return 'throttle_user_%s' % ident
 </s> remove _503_THROTTLED_RESPONSE = ErrorResponse(
 </s> add _503_SERVICE_UNAVAILABLE = ErrorResponse(
        # Advance the timer by one second
        MockView.permissions[0].timer = lambda self: 1

          request = self.factory.get('/')
          for dummy in range(4):
              response = MockView.as_view()(request)
          self.assertEqual(503, response.status_code)
        # Advance the timer by one second
        MockView.permissions[0].timer = lambda self: 1

          response = MockView.as_view()(request)
          self.assertEqual(200, response.status_code)
          
      def ensure_is_throttled(self, view, expect):
          request = self.factory.get('/')
keep keep keep keep replace keep keep keep keep keep
 Bits of cleaning up for the throttling 
djangorestframework/tests/throttling.py