Exemplo n.º 1
0
def main(args):

    jira = JiraProxy(REG_USER_CONFIG)

    users = jira.getAllUsers()
    for user in users:
        print(user.info())

    result = jira.getUser('devuser')
    print(f"\ndevuser: {result.info()}")
    result = jira.getUser('billybob')
    print(f"\nbillybob: {result}")
def test_retrieving_a_non_valid_jira_user():
    """
        will return a None value
    """
    jp = JiraProxy(GOOD_VANILLA_SERVER_CONFIG)
    user = jp.getUser('lollipopkid')
    assert user is None
def test_retrieving_a_valid_jira_user():
    """
        will return a single JiraUser instance
    """
    jp = JiraProxy(GOOD_VANILLA_SERVER_CONFIG)
    print(f'USER1_USER_NAME: {USER1_USER_NAME}')
    user = jp.getUser(USER1_USER_NAME)
    assert user
    print(user.info())
    assert user.name  == USER1_USER_NAME
    assert user.email == USER1_EMAIL