Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/f/l/Flask-Limiter-0.3.1/tests/test_flask_ext.py   Flask-Limiter(Download)
        mock_handler = mock.Mock()
        mock_handler.level = logging.INFO
        limiter.logger.addHandler(mock_handler)
        @app.route("/t1")
        @limiter.limit("1/minute")
        limiter = Limiter(app)
        for handler in app.logger.handlers:
            limiter.logger.addHandler(handler)
        @app.route("/t1")
        @limiter.limit("1/minute")
        mock_handler = mock.Mock()
        mock_handler.level = logging.INFO
        limiter.logger.addHandler(mock_handler)
        @app.route("/t1")
        @limiter.limit(lambda: current_app.config.get("X"))
        mock_handler = mock.Mock()
        mock_handler.level = logging.INFO
        limiter.logger.addHandler(mock_handler)
        @app.route("/t1")
        @limiter.limit("2/sec")