コード例 #1
0
    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
コード例 #2
0
    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
コード例 #3
0
    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
コード例 #4
0
    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
コード例 #5
0
 def assert_init_org(username, password, org):
     client = utils.get_client_org(username, password, org)
     utils.assert_access_token(client)
     client.logout()
コード例 #6
0
 def assert_init(username, password):
     client = utils.get_client(username, password)
     utils.assert_access_token(client)
     client.logout()
コード例 #7
0
 def assert_logout(client):
     utils.assert_access_token(client)
     client.logout()
     utils.assert_not_access_token(client)