Exemplo n.º 1
0
 def create_app(self):
     '''Create the wsgi application'''
     app_ = app.create_app(**{
         'FOO': ['bar', {}],
         'SQLALCHEMY_DATABASE_URI': 'sqlite:///',
            })
     return app_
Exemplo n.º 2
0
 def create_app(self):
     '''Create the wsgi application'''
     app_ = app.create_app(**{
         'FOO': ['bar', {}],
         'SQLALCHEMY_DATABASE_URI': 'sqlite:///',
     })
     return app_
Exemplo n.º 3
0
def get_app_config(key):
    opath = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
    if opath not in sys.path:
        sys.path.insert(0, opath)

    from graphics_service import app as application
    app = application.create_app()

    with app.app_context() as c:
        print('Getting actual config for', key, app.config.get(key))
        return app.config.get(key)
Exemplo n.º 4
0
 def create_app(self):
     '''Start the wsgi application'''
     from graphics_service import app
     a = app.create_app(**{
         'SQLALCHEMY_DATABASE_URI': self.postgresql_url,
         'SQLALCHEMY_ECHO': False,
         'TESTING': True,
         'PROPAGATE_EXCEPTIONS': True,
         'TRAP_BAD_REQUEST_ERRORS': True
     })
     return a
Exemplo n.º 5
0
    def create_app(self):
        '''Create the wsgi application'''
        g = GraphicsModel(bibcode='bibcode',
                          doi='DOI',
                          source='TEST',
                          eprint=False,
                          figures=[],
                          modtime=datetime.now())

        app_ = app.create_app()
        app_.db.session = mock.MagicMock()

        return app_
Exemplo n.º 6
0
    def create_app(self):
        '''Create the wsgi application'''
        g = GraphicsModel(
                bibcode='bibcode',
                doi='DOI',
                source='TEST',
                eprint=False,
                figures=[],
                modtime=datetime.now()
            )

        app_ = app.create_app()
        app_.db.session = mock.MagicMock()

        return app_
 def create_app(self):
     '''Create the wsgi application'''
     app_ = app.create_app()
     return app_
Exemplo n.º 8
0
 def create_app(self):
     '''Create the wsgi application'''
     app_ = app.create_app(SQLALCHEMY_DATABASE_URI=None)
     return app_
Exemplo n.º 9
0
# -*- coding: utf-8 -*-
"""
    wsgi
    ~~~~

    entrypoint wsgi script
"""

from werkzeug.serving import run_simple
from werkzeug.wsgi import DispatcherMiddleware

from graphics_service import app

application = app.create_app()

if __name__ == "__main__":
    run_simple('0.0.0.0',
               4000,
               application,
               use_reloader=False,
               use_debugger=True)
Exemplo n.º 10
0
 def create_app(self):
     '''Create the wsgi application'''
     app_ = app.create_app(SQLALCHEMY_DATABASE_URI=None)
     return app_
Exemplo n.º 11
0
# -*- coding: utf-8 -*-
"""
    wsgi
    ~~~~

    entrypoint wsgi script
"""

from werkzeug.serving import run_simple
from werkzeug.wsgi import DispatcherMiddleware

from graphics_service import app

application = app.create_app()

if __name__ == "__main__":
    run_simple('0.0.0.0', 4000, application, use_reloader=False,
               use_debugger=True)
Exemplo n.º 12
0
 def create_app(self):
     '''Create the wsgi application'''
     app_ = app.create_app()
     return app_