# Path: django_toolkit/pagination.py
# class RangeBasedPaginator(Paginator):
#     
#     def __init__(self, object_count, *args, **kwargs):
#         """
#         @todo Creating a range of values is really a waste of cycles...
#         """
#         object_list = range(1, object_count + 1)
#         super(RangeBasedPaginator, self).__init__(object_list, *args, **kwargs)


import unittest
from django_toolkit.pagination import RangeBasedPaginator

class RangeBasedPaginatorTestCase(unittest.TestCase):
    
    def test_num_pages(self):
        self.assertEqual(RangeBasedPaginator(10, 5).num_pages, 2)
        self.assertEqual(RangeBasedPaginator(10, 1).num_pages, 10)

# Path: django_toolkit/pagination.py
# class RangeBasedPaginator(Paginator):
#     
#     def __init__(self, object_count, *args, **kwargs):
#         """
#         @todo Creating a range of values is really a waste of cycles...
#         """
#         object_list = range(1, object_count + 1)
#         super(RangeBasedPaginator, self).__init__(object_list, *args, **kwargs)


# Path: django_toolkit/tests/pagination.py
import unittest
from django_toolkit.pagination import RangeBasedPaginator


class RangeBasedPaginatorTestCase(unittest.TestCase):
    
    def test_num_pages(self):
        self.assertEqual(RangeBasedPaginator(10, 5).num_pages, 2)
        self.assertEqual(RangeBasedPaginator(10, 1).num_pages, 10)

        self.assertEqual(RangeBasedPaginator(10, 10).num_pages, 1)