def get_apps(): user_app = UserApp() try: user_id = current_user.get_id() apps = user_app.get(user_id) if apps: response = {} response['user'] = current_user.serialize() response['apps'] = apps return jsonify(response) except Exception as e: print e raise ExceptionResponse()
def test_get_apps(): app_mapper = UserApp() apps = app_mapper.get(1) print apps