Ejemplo n.º 1
0
def test_create_app_debug(atm):
    app = create_app(atm, debug=True)

    assert app.name == 'atm.api'
    assert app.config['DEBUG']
Ejemplo n.º 2
0
def client(atm):
    app = create_app(atm)

    app.config['TESTING'] = True
    client = app.test_client()
    yield client
Ejemplo n.º 3
0
def test_create_app(atm):
    app = create_app(atm)

    assert app.name == 'atm.api'
    assert not app.config['DEBUG']
Ejemplo n.º 4
0
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)