def create_app(self): """ Create the wsgi application """ app_ = app.create_app() app_.config["SQLALCHEMY_DATABASE_URI"] = "sqlite://" app_.config["DEPLOY_LOGGING"] = {} return app_
def create_app(self): """ Create the wsgi application """ app_ = app.create_app() app_.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://' app_.config['DEPLOY_LOGGING'] = {} return app_
def create_app(self): """ Create the wsgi application """ app_ = app.create_app() app_.config["SQLALCHEMY_DATABASE_URI"] = "sqlite://" app_.config["GITHUB_SECRET"] = "unittest-secret" app_.config["RABBITMQ_URL"] = "rabbitmq" return app_
def create_app(self): """ Create the wsgi application """ app_ = app.create_app() app_.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://" app_.config['GITHUB_SECRET'] = 'unittest-secret' app_.config['RABBITMQ_URL'] = 'rabbitmq' return app_
def create_app(self): """ Create the wsgi application """ app_ = app.create_app() app_.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://' app_.config['DEPLOY_LOGGING'] = {} app_.config['WEBAPP_EXCHANGE'] = 'unit-test-exchange' app_.config['WEBAPP_ROUTE'] = 'unit-test-route' return app_
def create_app(self): """ Create the wsgi application """ app_ = app.create_app() app_.config["SQLALCHEMY_DATABASE_URI"] = "sqlite://" app_.config["DEPLOY_LOGGING"] = {} app_.config["WEBAPP_EXCHANGE"] = "unit-test-exchange" app_.config["WEBAPP_ROUTE"] = "unit-test-route" return app_
def test_get_boto_session(self, Session): """ get_boto_session should call Session with the current app's config """ app_ = app.create_app() app_.config["AWS_REGION"] = "unittest-region" app_.config["AWS_ACCESS_KEY"] = "unittest-access" app_.config["AWS_SECRET_KEY"] = "unittest-secret" with self.assertRaises(RuntimeError): # app-context must be available get_boto_session() with app_.app_context(): get_boto_session() Session.assert_called_with( aws_access_key_id="unittest-access", aws_secret_access_key="unittest-secret", region_name="unittest-region" )
# -*- coding: utf-8 -*- """ wsgi ~~~~ entrypoint wsgi script """ from werkzeug.serving import run_simple from ADSDeploy.webapp import app application = app.create_app() if __name__ == "__main__": run_simple( '0.0.0.0', 4000, application, use_reloader=False, use_debugger=True )