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)
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)
""" Application Main module """ import os from timeless import create_app app = create_app( os.environ.get("TIMELESSIS_CONFIG", "config.DevelopmentConfig"))