Beispiel #1
0
def main():
    app = application_factory()
    app.run(
        use_reloader=app.config["USE_RELOADER"],
        host=app.config["HOST"],
        port=app.config["PORT"],
        debug=app.config["DEBUG"])
Beispiel #2
0
 def test_configure(self):
     """Test the factory configures the app according to passed paths and
     objects in correct order
     """
     app = application_factory()
     self.assertNotEqual(app, None)
Beispiel #3
0
 def test_app_env(self):
     app = application_factory()
     self.assertTrue(app.jinja_env.autoescape)
     self.assertIn('jinja2.ext.AutoEscapeExtension',
                   app.jinja_env.extensions)
Beispiel #4
0
 def test_correct_class(self):
     app = application_factory()
     with app.test_request_context('/'):
         self.assertNotIsInstance(flask.g, flask.ctx._RequestGlobals)
Beispiel #5
0
 def get_client(self):
     self.useFixture(fixtures.MonkeyPatch(
         "focus2.api.client.MeCollection.check_credentials",
         lambda self, auth=None: auth == ('okname', 'okpass')))
     return application_factory().test_client()