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"])
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)
def test_app_env(self): app = application_factory() self.assertTrue(app.jinja_env.autoescape) self.assertIn('jinja2.ext.AutoEscapeExtension', app.jinja_env.extensions)
def test_correct_class(self): app = application_factory() with app.test_request_context('/'): self.assertNotIsInstance(flask.g, flask.ctx._RequestGlobals)
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()