Beispiel #1
0
    def setUp(self):
        self.db_file, self.db_path = tempfile.mkstemp(suffix='.db')

        self.app = create_app(config=dict(TESTING=True), db_path=self.db_path)
        self.app.config['db'].create()

        self.client = self.app.test_client()
Beispiel #2
0
def app():
    """
    """
    flask_app = create_app()
    flask_app.app.config["TESTING"] = True

    with flask_app.app.app_context():
        yield flask_app
def test_client():
    flask_app = create_app()

    testing_client = flask_app.test_client()

    ctx = flask_app.app_context()
    ctx.push()

    yield testing_client

    ctx.pop()
def app():
    """Session-wide test `Flask` application.

    Establish an application context before running the tests.
    """
    app = create_app(testing=True)
    ctx = app.app_context()
    ctx.push()
    yield app

    ctx.pop()
def run_app(debug, port, host):
    app = create_app()
    app.run(host=host, port=port, debug=debug)
Beispiel #6
0
def run_app():
    app = create_app()
    app.run()
from family_tree.app import create_app, db  # noqa
from family_tree.models import *  # noqa

app = create_app()
app.app_context().push()
Beispiel #8
0
def run_app():
    app = create_app()
    monitor(app)
    app.run()