本文整理汇总了Python中pyjen.jenkins.Jenkins.find_user方法的典型用法代码示例。如果您正苦于以下问题:Python Jenkins.find_user方法的具体用法?Python Jenkins.find_user怎么用?Python Jenkins.find_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjen.jenkins.Jenkins
的用法示例。
在下文中一共展示了Jenkins.find_user方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_user_id
# 需要导入模块: from pyjen.jenkins import Jenkins [as 别名]
# 或者: from pyjen.jenkins.Jenkins import find_user [as 别名]
def test_get_user_id(jenkins_env):
jk = Jenkins(jenkins_env["url"], (jenkins_env["admin_user"], jenkins_env["admin_token"]))
user = jk.find_user("admin")
result = user.user_id
assert result is not None
assert result == "admin"
示例2: test_get_no_description
# 需要导入模块: from pyjen.jenkins import Jenkins [as 别名]
# 或者: from pyjen.jenkins.Jenkins import find_user [as 别名]
def test_get_no_description(jenkins_env):
jk = Jenkins(jenkins_env["url"], (jenkins_env["admin_user"], jenkins_env["admin_token"]))
user = jk.find_user("admin")
result = user.description
assert result is not None
assert isinstance(result, str)
assert result == ''
示例3: test_find_user_not_exists
# 需要导入模块: from pyjen.jenkins import Jenkins [as 别名]
# 或者: from pyjen.jenkins.Jenkins import find_user [as 别名]
def test_find_user_not_exists(jenkins_env):
jk = Jenkins(jenkins_env["url"], (jenkins_env["admin_user"], jenkins_env["admin_token"]))
user = jk.find_user("UserDoesNotExist")
assert user is None
示例4: test_find_user
# 需要导入模块: from pyjen.jenkins import Jenkins [as 别名]
# 或者: from pyjen.jenkins.Jenkins import find_user [as 别名]
def test_find_user(jenkins_env):
jk = Jenkins(jenkins_env["url"], (jenkins_env["admin_user"], jenkins_env["admin_token"]))
user = jk.find_user(jenkins_env["admin_user"])
assert user is not None
assert user.full_name == jenkins_env["admin_user"]
示例5: test_get_no_email
# 需要导入模块: from pyjen.jenkins import Jenkins [as 别名]
# 或者: from pyjen.jenkins.Jenkins import find_user [as 别名]
def test_get_no_email(jenkins_env):
jk = Jenkins(jenkins_env["url"], (jenkins_env["admin_user"], jenkins_env["admin_token"]))
user = jk.find_user("admin")
result = user.email
assert result is None