示例#1
0
def test_jump_to_last_page_if_index_to_high():
    row = ["Paul", "12"]
    paginator = Paginator(header=[], rows=[row, row, row, row, row,
                                           row, row, row, row])

    page = paginator.jump_to_page(2)

    assert len(page.rows) == 4
示例#2
0
def test_jump_to_page():
    row = ["Paul", "12"]
    paginator = Paginator(header=[], rows=[row, row, row, row, row,
                                           row, row, row, row])

    page = paginator.jump_to_page(0)

    assert len(page.rows) == 5