Exemple #1
0
def app():
    db_fd, db_path = tempfile.mkstemp()
    app = create_app("config.TestingConfig")
    app_context = app.test_request_context()
    app_context.push()
    yield app
    os.close(db_fd)
    os.unlink(db_path)
Exemple #2
0
def app():
    db_fd, db_path = tempfile.mkstemp()
    app = create_app("config.TestingConfig")
    app_context = app.test_request_context()
    app_context.push()
    DB.create_all()
    yield app
    DB.session.remove()
    DB.drop_all()
    os.close(db_fd)
    os.unlink(db_path)
Exemple #3
0
""" Application Main module """
import os
from timeless import create_app

app = create_app(
    os.environ.get("TIMELESSIS_CONFIG", "config.DevelopmentConfig"))