Ejemplo n.º 1
0
 def create_app(self):
     """
     Create the wsgi application
     """
     app_ = app.create_app()
     app_.config["SQLALCHEMY_DATABASE_URI"] = "sqlite://"
     app_.config["DEPLOY_LOGGING"] = {}
     return app_
Ejemplo n.º 2
0
 def create_app(self):
     """
     Create the wsgi application
     """
     app_ = app.create_app()
     app_.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
     app_.config['DEPLOY_LOGGING'] = {}
     return app_
Ejemplo n.º 3
0
 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_
Ejemplo n.º 4
0
 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_
Ejemplo n.º 5
0
 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_
Ejemplo n.º 6
0
 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_
Ejemplo n.º 7
0
 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"
     )
Ejemplo n.º 8
0
# -*- 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
    )