def test_create_app_debug(atm): app = create_app(atm, debug=True) assert app.name == 'atm.api' assert app.config['DEBUG']
def client(atm): app = create_app(atm) app.config['TESTING'] = True client = app.test_client() yield client
def test_create_app(atm): app = create_app(atm) assert app.name == 'atm.api' assert not app.config['DEBUG']
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)