Пример #1
0
 def setUp(self):
     """Prepare middleware for use through fake WSGI app."""
     BaseLimitTestSuite.setUp(self)
     _limits = [
         Limit("GET", "*", ".*", 1, 60),
     ]
     self.app = limits.RateLimitingMiddleware(self._empty_app, _limits)
Пример #2
0
 def setUp(self):
     """Prepare middleware for use through fake WSGI app."""
     BaseLimitTestSuite.setUp(self)
     _limits = '(GET, *, .*, 1, MINUTE)'
     self.app = limits.RateLimitingMiddleware(self._empty_app, _limits,
                                              "%s.TestLimiter" %
                                              self.__class__.__module__)