def client(): config_dict = {"tkpath": "../题库_测试.json"} app = server_app.create_app(config_dict) app.config.update() with app.test_client() as client: yield client
"""App entry point""" from server_app import create_app app = create_app() if __name__ == "__main__": app.run(host='0.0.0.0', debug=True)
from server_app import create_app from config import Config from flask_migrate import Migrate, MigrateCommand from flask_script import Manager from data.model import db app = create_app(Config) Migrate(app, db) manager = Manager(app) manager.add_command('db', MigrateCommand) if __name__ == '__main__': manager.run()