Esempio n. 1
0
def leaderboard(ctx, expand, objective_key, sort):
    """Display objective leaderboard"""
    client = get_client(ctx.obj)
    board = client.leaderboard(objective_key, sort=sort)
    printer = printers.get_leaderboard_printer(ctx.obj.output_format)
    printer.print(board, expand=expand)
def test_get_leaderboard_printer(output_format, printer_cls):
    assert isinstance(printers.get_leaderboard_printer(output_format),
                      printer_cls)