

def test_silent_empty_page_error(table):
    request = build_request('/')
    paginator = Fake('Paginator').has_attr(num_pages=987).expects('page').with_args(987)
    table = table.has_attr(paginator=paginator).expects('paginate').with_args(page=123).raises(EmptyPage)
    RequestConfig(request, paginate={
        'page': 123,
        'silent': True,
    }).configure(table)

dataset/ETHPy150Open bradleyayers/django-tables2/tests/test_config.py test_silent_empty_page_error/original