diff options
| author | Tom Christie | 2015-02-09 20:43:50 +0000 | 
|---|---|---|
| committer | Tom Christie | 2015-02-09 20:43:50 +0000 | 
| commit | fbb21caaaa01033bbd34b0c63ab48243ffb6310e (patch) | |
| tree | 5d0fdee18c9bf02733b1df913c4cddd9e3e86da7 /tests/test_throttling.py | |
| parent | 407480b4840990ff17f9a33b293cfcf15bb6f7c5 (diff) | |
| parent | 7b639c0cd0676172cc8502e833f5b708f39f9a83 (diff) | |
| download | django-rest-framework-fbb21caaaa01033bbd34b0c63ab48243ffb6310e.tar.bz2 | |
Merge master
Diffstat (limited to 'tests/test_throttling.py')
| -rw-r--r-- | tests/test_throttling.py | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/tests/test_throttling.py b/tests/test_throttling.py index cc36a004..50a53b3e 100644 --- a/tests/test_throttling.py +++ b/tests/test_throttling.py @@ -188,7 +188,9 @@ class ScopedRateThrottleTests(TestCase):          class XYScopedRateThrottle(ScopedRateThrottle):              TIMER_SECONDS = 0              THROTTLE_RATES = {'x': '3/min', 'y': '1/min'} -            timer = lambda self: self.TIMER_SECONDS + +            def timer(self): +                return self.TIMER_SECONDS          class XView(APIView):              throttle_classes = (XYScopedRateThrottle,) @@ -290,7 +292,9 @@ class XffTestingBase(TestCase):          class Throttle(ScopedRateThrottle):              THROTTLE_RATES = {'test_limit': '1/day'}              TIMER_SECONDS = 0 -            timer = lambda self: self.TIMER_SECONDS + +            def timer(self): +                return self.TIMER_SECONDS          class View(APIView):              throttle_classes = (Throttle,) | 
