模拟或避免 pytest 的认知身份验证和组权限

我有一个 flask 应用程序,我正在尝试为我构建的服务实施 pytest。所有路由都需要 Cognito 身份验证或 Cognito 组权限。有没有办法可以模拟或避免认知?从我在网上阅读的所有文章来看,到目前为止没有任何帮助。

如何为下面的示例实现 pytest?

@app.route('/hello')
@cognito_auth_required
@cognito_group_permissions(["test"])
def hello():
    return 'Hello,World'
zhikejie 回答:模拟或避免 pytest 的认知身份验证和组权限

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/21543.html

大家都在问