Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Dict TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Dict Str Str Num Num TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str Num TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Dict Str Str Num Num TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Num Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Num Call NameLoad Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Num Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Num Call NameLoad Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Assign AttributeStore NameLoad attr Call NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Num Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num NameLoad Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num Num Num NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num NameLoad Num Num Num Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num NameLoad Num Num Num Num Num NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Num Expr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Call AttributeLoad Str attr NameLoad comprehension NameStore Call NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr attr Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Num Expr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num attr Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Num Num decorator_list decorator_list
N/A N/A 
Tests for pagination utilities.

 mock Mock django.core.exceptions SuspiciousOperation tests case tests.utils Url TestFromRequest N/A N/A case DBTestCase N/A N/A Tests for ``from_request`` function. func N/A N/A self N/A N/A N/A The function under test. moztrap.view.lists.pagination from_request N/A from_request N/A property _check N/A N/A self GET result N/A N/A N/A Assert that a request with ``GET`` params gives ``result`` N/A request N/A Mock N/A N/A request GET GET N/A N/A N/A self assertEqual N/A N/A self func request result N/A test_defaults N/A N/A self N/A N/A N/A Defaults to page 1, 20 per page, if no values in querystring. N/A N/A N/A self _check N/A N/A 20 1 N/A test_set N/A N/A self N/A N/A N/A Values from querystring override defaults. N/A N/A N/A self _check N/A pagesize pagenumber 10 2 N/A 10 2 N/A test_invalid N/A N/A self N/A N/A N/A Non-numbers fallback to default. N/A N/A N/A self _check N/A pagesize pagenumber blah 2 N/A 20 2 N/A test_negative N/A N/A self N/A N/A N/A Out-of-bounds numbers are constrained to bounds. N/A N/A N/A self _check N/A pagesize pagenumber 20 -2 N/A 20 1 N/A test_valid_number_but_not_allowed N/A N/A self N/A N/A N/A Value that is a sane number but not in the
        PAGESIZES list N/A request N/A Mock N/A N/A request GET N/A pagesize pagenumber 99 1 N/A N/A N/A self assertRaises SuspiciousOperation N/A self func request N/A N/A TestPagesizeUrl N/A N/A case TestCase N/A N/A Tests for ``pagesize_url`` function. func N/A N/A self N/A N/A N/A The function under test. moztrap.view.lists.pagination pagesize_url N/A pagesize_url N/A property test_simple N/A N/A self N/A N/A N/A Adds pagenumber and pagesize to a URL with neither in querystring. N/A N/A N/A self assertEqual N/A Url N/A N/A self func http://fake.base/ 10 N/A Url http://fake.base/?pagenumber=1&pagesize=10 N/A test_override N/A N/A self N/A N/A N/A Overrides existing values in querystring, jumping back to page 1. N/A N/A N/A self assertEqual N/A Url N/A N/A self func http://fake.base/?pagesize=40&pagenumber=3 10 N/A Url http://fake.base/?pagenumber=1&pagesize=10 N/A N/A TestPagenumberUrl N/A N/A case TestCase N/A N/A Tests for ``pagenumber_url`` function. func N/A N/A self N/A N/A N/A The function under test. moztrap.view.lists.pagination pagenumber_url N/A pagenumber_url N/A property test_simple N/A N/A self N/A N/A N/A Adds pagenumber to a URL without it in querystring. N/A N/A N/A self assertEqual N/A Url N/A N/A self func http://fake.base/ 3 N/A Url http://fake.base/?pagenumber=3 N/A test_override N/A N/A self N/A N/A N/A Overrides existing value in querystring. N/A N/A N/A self assertEqual N/A Url N/A N/A self func http://fake.base/?pagesize=40&pagenumber=3 5 N/A Url http://fake.base/?pagenumber=5&pagesize=40 N/A N/A TestPager N/A N/A case DBTestCase N/A N/A Tests for ``Pager`` class. pager N/A N/A self N/A N/A N/A The class under test. moztrap.view.lists.pagination Pager N/A Pager N/A property qs N/A N/A self count N/A N/A N/A Returns mock queryset with given count. N/A qs N/A Mock N/A N/A N/A qs count return_value count N/A N/A N/A qs empty return_value N/A N/A N/A qs __getitem__ N/A Mock N/A qs N/A test_sizes_with_standard_size N/A N/A self N/A N/A N/A Has built-in standard set of page-size options. N/A p N/A N/A self pager N/A N/A self qs 5 10 1 N/A N/A N/A self assertEqual N/A N/A p sizes N/A 10 20 50 100 N/A test_sizes_with_nonstandard_size N/A N/A self N/A N/A N/A Current pagesize is always included in page-size options. N/A p N/A N/A self pager N/A N/A self qs 5 15 1 N/A N/A N/A self assertEqual N/A N/A p sizes N/A 10 15 20 50 100 N/A test_pages_empty N/A N/A self N/A N/A N/A With no objects, there's still one page. N/A p N/A N/A self pager N/A N/A self qs 0 20 1 N/A N/A N/A self assertEqual N/A list N/A N/A p pages N/A 1 N/A test_pages_less_than_size N/A N/A self N/A N/A N/A With fewer objects than one full page, there's one page. N/A p N/A N/A self pager N/A N/A self qs 10 20 1 N/A N/A N/A self assertEqual N/A list N/A N/A p pages N/A 1 N/A test_pages_equal_to_size N/A N/A self N/A N/A N/A With exactly one page's worth of objects, there's one page. N/A p N/A N/A self pager N/A N/A self qs 20 20 1 N/A N/A N/A self assertEqual N/A list N/A N/A p pages N/A 1 N/A test_pages_more_than_size N/A N/A self N/A N/A N/A With more than one page's worth of objects, there's two pages. N/A p N/A N/A self pager N/A N/A self qs 21 20 1 N/A N/A N/A self assertEqual N/A list N/A N/A p pages N/A 1 2 N/A test_display_pages_empty N/A N/A self N/A N/A N/A With no objects, one page is linked in nav. N/A p N/A N/A self pager N/A N/A self qs 0 20 1 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 N/A test_display_pages_less_than_size N/A N/A self N/A N/A N/A With less than one page's objects, one page is linked in nav. N/A p N/A N/A self pager N/A N/A self qs 10 20 1 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 N/A test_display_pages_equal_to_size N/A N/A self N/A N/A N/A With exactly one page's objects, one page is linked in nav. N/A p N/A N/A self pager N/A N/A self qs 20 20 1 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 N/A test_display_pages_more_than_size N/A N/A self N/A N/A N/A With more than one page's objects, both pages are linked in nav. N/A p N/A N/A self pager N/A N/A self qs 21 20 1 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 2 N/A test_display_pages_long_on_first N/A N/A self N/A N/A N/A With many pages, some in the middle are elided. N/A p N/A N/A self pager N/A N/A self qs 120 10 1 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 2 3 None 11 12 N/A test_display_pages_long_on_last N/A N/A self N/A N/A N/A At least two pages on each side of current page are shown. N/A p N/A N/A self pager N/A N/A self qs 120 10 12 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 2 None 10 11 12 N/A test_display_pages_long_near_one_end N/A N/A self N/A N/A N/A If only one page would be elided, it isn't. N/A p N/A N/A self pager N/A N/A self qs 120 10 5 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 2 3 4 5 6 7 None 11 12 N/A test_display_pages_long_near_other_end N/A N/A self N/A N/A N/A Overlap between near-current and near-end is not a problem. N/A p N/A N/A self pager N/A N/A self qs 120 10 9 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 2 None 7 8 9 10 11 12 N/A test_display_pages_long_in_middle N/A N/A self N/A N/A N/A May be two elisions, if in middle of long page set. N/A p N/A N/A self pager N/A N/A self qs 150 10 8 N/A N/A N/A self assertEqual N/A list N/A N/A p display_pages N/A 1 2 None 6 7 8 9 10 None 14 15 N/A test_total N/A N/A self N/A N/A N/A Total number of objects is count of queryset. N/A p N/A N/A self pager N/A N/A self qs 10 20 1 N/A N/A N/A self assertEqual N/A p total 10 N/A test_total_cached N/A N/A self N/A N/A N/A Checking total twice doesn't query db for count twice. N/A qs N/A N/A self qs 10 N/A p N/A N/A self pager qs 20 1 N/A N/A p total N/A N/A p total N/A N/A N/A self assertEqual N/A N/A qs count call_count 1 N/A test_objects N/A N/A self N/A N/A N/A .objects is list of objects on current page. N/A products N/A N/A N/A N/A N/A self F ProductFactory create name N/A N/A Product {0} format i N/A i N/A range 1 5 N/A p N/A N/A self pager N/A N/A N/A N/A N/A products N/A 0 __class__ objects all 3 1 N/A N/A N/A self assertEqual N/A list N/A p objects N/A products N/A 3 N/A test_objects_empty N/A N/A self N/A N/A N/A .objects can be empty. N/A p N/A N/A self pager N/A N/A self qs 0 3 1 N/A N/A N/A self assertEqual N/A list N/A p objects N/A N/A test_sliced_queryset_cached N/A N/A self N/A N/A N/A Accessing .objects twice does not query db twice. N/A qs N/A N/A self qs 10 N/A p N/A N/A self pager qs 5 1 N/A N/A p objects N/A N/A p objects N/A N/A N/A self assertEqual N/A N/A qs __getitem__ call_count 1 N/A test_num_pages_empty N/A N/A self N/A N/A N/A With no objects, there's still one page. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 0 20 1 num_pages 1 N/A test_num_pages_less_than_size N/A N/A self N/A N/A N/A With less than one page's objects, there's one page. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 15 20 1 num_pages 1 N/A test_num_pages_equal_to_size N/A N/A self N/A N/A N/A With exactly one page's objects, there's one page. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 20 20 1 num_pages 1 N/A test_num_pages_more_than_size N/A N/A self N/A N/A N/A With more than one page's objects, there's one page. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 21 20 1 num_pages 2 N/A test_low_empty N/A N/A self N/A N/A N/A With no objects, the first displayed is the zero-th. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 0 20 1 low 0 N/A test_high_empty N/A N/A self N/A N/A N/A With no objects, the last displayed is the zero-th. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 0 20 1 high 0 N/A test_low_less_than_size N/A N/A self N/A N/A N/A With only one page, the first displayed is the first. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 15 20 1 low 1 N/A test_high_less_than_size N/A N/A self N/A N/A N/A With only one page, the last displayed is the last. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 15 20 1 high 15 N/A test_low_equal_to_size N/A N/A self N/A N/A N/A With exactly one page's objects, first displayed is the first. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 20 20 1 low 1 N/A test_high_equal_to_size N/A N/A self N/A N/A N/A With exactly one page's objects, last displayed is the last. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 20 20 1 high 20 N/A test_low_more_than_size_page1 N/A N/A self N/A N/A N/A With more than one page, first on first page is the first. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 21 20 1 low 1 N/A test_high_more_than_size_page1 N/A N/A self N/A N/A N/A With more than one page, last on first page is the page size-th. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 21 20 1 high 20 N/A test_low_more_than_size_page2 N/A N/A self N/A N/A N/A With two pages, first on second page is page-size+1-th. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 21 20 2 low 21 N/A test_high_more_than_size_page2 N/A N/A self N/A N/A N/A With two pages, last on second page is the last. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 21 20 2 high 21 N/A test_prev_none N/A N/A self N/A N/A N/A If there is no previous page, .prev is None. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 5 20 1 prev None N/A test_prev N/A N/A self N/A N/A N/A If there is a previous page, .prev is its number. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 25 20 2 prev 1 N/A test_next_none N/A N/A self N/A N/A N/A If there is no next page, .next is None. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 5 20 1 next None N/A test_next N/A N/A self N/A N/A N/A If there is a next page, .next is its number. N/A N/A N/A self assertEqual N/A N/A N/A self pager N/A N/A self qs 25 20 1 next 2 N/A N/A TestPositiveInteger N/A N/A case TestCase N/A N/A Tests for ``positive_integer`` function. func N/A N/A self N/A N/A N/A The function under test. moztrap.view.lists.pagination positive_integer N/A positive_integer N/A property test_negative N/A N/A self N/A N/A N/A Negative numbers are coerced to 1. N/A N/A N/A self assertEqual N/A N/A self func -1 5 1 N/A test_zero N/A N/A self N/A N/A N/A Zero is coerced to 1. N/A N/A N/A self assertEqual N/A N/A self func 0 5 1 N/A test_positive N/A N/A self N/A N/A N/A Positive in-bounds numbers are returned as-is. N/A N/A N/A self assertEqual N/A N/A self func 1 5 1 N/A test_none N/A N/A self N/A N/A N/A None is coerced to the given default. N/A N/A N/A self assertEqual N/A N/A self func None 5 5 N/A test_string N/A N/A self N/A N/A N/A Non-numbers are coerced to the given default. N/A N/A N/A self assertEqual N/A N/A self func blah 5 5 N/A N/A