How can I remove “@oidc.login_required” for unit testing from a view?
问题 I use flask-oidc for user login and pytest for testing. For unit testing, I would like to "remove" @oidc.require_login . How can I do that? What I tried The way flask-o works is roughly: from flask import Flask, url_for, redirect from flask_oidc import OpenIDConnect app = Flask(__name__) app.config['OIDC_CLIENT_SECRETS'] = 'client_secrets.json' # Contents: # Create client_id and client_secret at https://console.developers.google.com/apis/credentials # { # "web": { # "client_id": "123456789012