Example #1
0
def test_client_get_global_leaderboard_error(client: SyncClient):
    with pytest.raises(ValueError):
        client.get_global_leaderboard(type="NONEXISTENT")
    with pytest.raises(ValueError):
        client.get_global_leaderboard(group="nonexistent")
    with pytest.raises(exceptions.LoginRequired):
        client.get_global_leaderboard(group="country")
Example #2
0
def test_client_get_global_leaderboard(client: SyncClient):
    global_leaderboard = client.get_global_leaderboard()
    assert isinstance(global_leaderboard, GlobalLeaderboard)
    assert isinstance(global_leaderboard.users[0], GlobalRankedCodinGamer)