예제 #1
0
def app():
  """
  Setup our flask test app, this only gets executed once

  :return: Flask app
  """

  params = {
    'DEBUG': False,
    'TESTING': True
  }

  _app = create_app(settings_override=params)

  # Establish application context before running tests

  ctx = _app.app_context()
  ctx.push()

  yield _app

  ctx.pop()
예제 #2
0
# -*- coding: utf-8 -*-
import os
from core.app import create_app
from gevent.pywsgi import WSGIServer
import werkzeug.serving

app = create_app()
app.config['PROPAGATE_EXCEPTIONS'] = True


@werkzeug.serving.run_with_reloader
def runServer():
    http_server = WSGIServer(('0.0.0.0', 5000), app)
    print("Gevent serve forever on", 5000)
    http_server.serve_forever()


# from core.app import create_app as app

# if __name__ == '__main__':
#     app.run()
예제 #3
0
from core.app import create_app

application = create_app({
    'SECRET_KEY': 'secret',
})

if __name__ == '__main__':
    application.run(host="127.0.0.1", port=5000, debug=True)
예제 #4
0
from core import app, views, async

web = app.create_app(views)
async = async.create_app()
예제 #5
0
def app():
    """ Instance of Main flask app """
    return create_app()
예제 #6
0
from core.app import app_name, create_app

if __name__ == '__main__':
    print(app_name)
    create_app().run()
예제 #7
0
from core import app, views, async

web = app.create_app(views)
async = async .create_app()
예제 #8
0
def app():
    app = create_app()
    app.debug = True
    return app
예제 #9
0
def instance_app():
    instance_app = create_app()
    return instance_app
예제 #10
0
 def setUp(self):
     self.client = create_app(DevConfig).test_client()
예제 #11
0
# -*- coding: utf-8 -*-
"""Create an application instance."""
from core.app import create_app

from core.settings import ProductionConfig

app = create_app(ProductionConfig)