def test_get_digity_inactive_user(): """ should find an inactive user whose username contains only digits """ jp = JiraProxy(GOOD_VANILLA_SERVER_CONFIG) users = jp.getAllUsers() jb_user = [u for u in users if u.name == USERNUM_USER_NAME][0] assert jb_user.display_name == USERNUM_DISPLAY_NAME
def test_get_jira_user_with_info(): """ return a JiraUser with all attributes correctly populated """ jp = JiraProxy(GOOD_VANILLA_SERVER_CONFIG) users = jp.getAllUsers() jb_user = [u for u in users if u.name == USERNUM_USER_NAME][0] assert jb_user.display_name == USERNUM_DISPLAY_NAME assert jb_user.email == USERNUM_EMAIL assert jb_user.active == USERNUM_ACTIVE
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_get_all_users(): """ will return all users with the getAllUsers method """ jp = JiraProxy(GOOD_VANILLA_SERVER_CONFIG) users = jp.getAllUsers() assert len(users) >= 4 user_names = [user.name for user in users] assert DESIGNATED_ACTIVE_USER in user_names assert DESIGNATED_INACTIVE_USER in user_names active_user = [ user for user in users if user.name == DESIGNATED_ACTIVE_USER ][0] inactive_user = [ user for user in users if user.name == DESIGNATED_INACTIVE_USER ][0] assert active_user.active == True assert inactive_user.active == False
def main(args): jira = JiraProxy(REG_USER_CONFIG) for user in jira.getAllUsers(): print(user.info())
def main(args): jira = JiraProxy(ON_DEMAND_CONFIG) for user in jira.getAllUsers(): print(user.info())