Beispiel #1
0
 def test_allow_request_returns_true_if_key_is_none(self):
     throttle = SimpleRateThrottle()
     throttle.rate = 'some rate'
     throttle.get_cache_key = lambda *args: None
     assert throttle.allow_request(request={}, view={}) is True
 def test_allow_request_returns_true_if_key_is_none(self):
     throttle = SimpleRateThrottle()
     throttle.rate = 'some rate'
     throttle.get_cache_key = lambda *args: None
     assert throttle.allow_request(request={}, view={}) is True