示例#1
0
def create_app(config=None):
    app = Flask(__name__)

    if config is None:
        config = _config.load()
    app.config.update(config)

    register_error_handlers(app)

    app.register_blueprint(instance.blueprint)

    return app
示例#2
0
def test_config_load(config):
    assert _config.load() == config