def assert_login(client, username, password): utils.assert_access_token(client) old_token = client._get_access_token() client.login(username, password) utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token
def assert_refresh(client): utils.assert_access_token(client) old_token = client._get_access_token() client.refresh() utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token
def assert_logout_login_org(client, username, password, org): utils.assert_access_token(client) old_token = client._get_access_token() client.logout() utils.assert_not_access_token(client) client.login(username, password, org) utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token
def assert_change_password(client, username, old_password, new_password, org): assert_password_correct(username, old_password, org) assert_password_incorrect(username, new_password, org) utils.assert_access_token(client) old_token = client._get_access_token() client.users.change_password(old_password, new_password) assert_password_incorrect(username, old_password, org) assert_password_correct(username, new_password, org) utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token
def assert_init_org(username, password, org): client = utils.get_client_org(username, password, org) utils.assert_access_token(client) client.logout()
def assert_init(username, password): client = utils.get_client(username, password) utils.assert_access_token(client) client.logout()
def assert_logout(client): utils.assert_access_token(client) client.logout() utils.assert_not_access_token(client)