aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_throttling.py
diff options
context:
space:
mode:
authorTom Christie2015-02-09 17:43:20 +0000
committerTom Christie2015-02-09 17:43:20 +0000
commitb2939c157d32e604e10099be891e382d8c54bbec (patch)
tree6b164989c0b659a2d92051c3fbd6625306056ecb /tests/test_throttling.py
parent0669f507b3a63114cf429f0662b1781f0e1fa5f8 (diff)
downloaddjango-rest-framework-b2939c157d32e604e10099be891e382d8c54bbec.tar.bz2
Fixes for latest version of pep8
Diffstat (limited to 'tests/test_throttling.py')
-rw-r--r--tests/test_throttling.py8
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,)