本文整理汇总了Python中privacyidea.lib.user.User.get_realm_resolvers方法的典型用法代码示例。如果您正苦于以下问题:Python User.get_realm_resolvers方法的具体用法?Python User.get_realm_resolvers怎么用?Python User.get_realm_resolvers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类privacyidea.lib.user.User
的用法示例。
在下文中一共展示了User.get_realm_resolvers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_01_resolvers_of_user
# 需要导入模块: from privacyidea.lib.user import User [as 别名]
# 或者: from privacyidea.lib.user.User import get_realm_resolvers [as 别名]
def test_01_resolvers_of_user(self):
user = User(login="root",
realm=self.realm1)
resolvers = user.get_realm_resolvers()
self.assertTrue(self.resolvername1 in resolvers, resolvers)
self.assertFalse(self.resolvername2 in resolvers, resolvers)
resolvers = user.get_resolvers()
self.assertTrue(self.resolvername1 in resolvers, resolvers)
self.assertFalse(self.resolvername2 in resolvers, resolvers)
user2 = User(login="root",
realm=self.realm1,
resolver=self.resolvername1)
resolvers = user2.get_resolvers()
self.assertTrue(self.resolvername1 in resolvers, resolvers)
self.assertFalse(self.resolvername2 in resolvers, resolvers)