示例#1
0
    def setup_class(self):
        views.manager = BackendManager({'dummy': {'enabled': True}})
        app.config['TESTING'] = True

        # 5 reqs / 1 sec
        # Do this two different ways so when test is run as a standalone, still
        # works. Probably indicative of bad design, but works for purposes of
        # this test.
        RateLimit.enable(limit=5, per=1)
        app.config['SERVER']['ratelimit'] = {
            'enabled': True,
            'limit': 5,
            'per': 1
        }

        self.client = app.test_client()
示例#2
0
 def setup_class(self):
     views.manager = BackendManager({})
     app.config["TESTING"] = True
     app.config["SERVER"]["sizelimit"] = {"enabled": True, "limit": 100}
     self.client = app.test_client()
示例#3
0
 def setup_class(self):
     views.manager = BackendManager({})
     app.config['TESTING'] = True
     app.config['SERVER']['sizelimit'] = {'enabled': True, 'limit': 100}
     self.client = app.test_client()
示例#4
0
    def setup_class(self):
        views.manager = translate.backend.BackendManager({})

        app.config['TESTING'] = True

        self.client = app.test_client()
示例#5
0
    def setup_class(self):
        views.manager = translate.backend.BackendManager({})

        app.config["TESTING"] = True

        self.client = app.test_client()