示例#1
0
def test_create_app_debug(atm):
    app = create_app(atm, debug=True)

    assert app.name == 'atm.api'
    assert app.config['DEBUG']
示例#2
0
def client(atm):
    app = create_app(atm)

    app.config['TESTING'] = True
    client = app.test_client()
    yield client
示例#3
0
def test_create_app(atm):
    app = create_app(atm)

    assert app.name == 'atm.api'
    assert not app.config['DEBUG']
示例#4
0
文件: cli.py 项目: yishuihanhan/ATM
def _serve(args):
    """Launch the ATM API with the given host / port."""
    atm = _get_atm(args)
    app = create_app(atm, getattr(args, 'debug', False))
    app.run(host=args.host, port=args.port)