Ejemplo n.º 1
0
def test_delim_sequence(sdk: mtds.Looker40SDK, email_domain: str,
                        users: List[Dict[str, str]]):
    search_results = sdk.search_users_names(pattern=f"%{email_domain}")
    assert len(search_results) == len(users)
    delim_ids = ml.DelimSequence([cast(int, u.id) for u in search_results])
    all_users = sdk.all_users(ids=delim_ids)
    assert len(all_users) == len(users)
Ejemplo n.º 2
0
def test_csv_user_id_list(sdk: mtds.Looker40SDK):
    """all_users() should accept a delimited array of ids."""
    users = sdk.all_users()
    assert len(users) > 1
    ids = [user.id for user in users]
    all_users = sdk.all_users(ids=ml.DelimSequence(cast(Sequence[int], ids)))
    assert len(all_users) == len(users)