Allow for a variable as the paginate_by parameter. Also added tests for this case...
[django-pagination.git] / pagination / tests.py
index 21ec9d2..1579166 100644 (file)
@@ -48,5 +48,11 @@ u'\\n\\n<div class="pagination">...
 >>> t = Template("{% load pagination_tags %}{% autopaginate var %}{% paginate %}")
 >>> t.render(Context({'var': range(21), 'request': RequestProxy()}))
 u'\\n\\n<div class="pagination">...
+>>> t = Template("{% load pagination_tags %}{% autopaginate var 20 %}{% paginate %}")
+>>> t.render(Context({'var': range(21), 'request': RequestProxy()}))
+u'\\n\\n<div class="pagination">...
+>>> t = Template("{% load pagination_tags %}{% autopaginate var by %}{% paginate %}")
+>>> t.render(Context({'var': range(21), 'by': 20, 'request': RequestProxy()}))
+u'\\n\\n<div class="pagination">...
 >>>
 """
\ No newline at end of file