Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Commit

Permalink
fix for test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Malinowski committed Mar 21, 2013
1 parent 98b0675 commit 2918ede
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@
test.db
build
dist
.idea/
10 changes: 5 additions & 5 deletions linaro_django_pagination/tests.py
Expand Up @@ -171,24 +171,24 @@
... page = lambda self, suffix: 1
>>> t.render(Context({'var': range(21), 'request': HttpRequest()}))
u'\\n\\n<div class="pagination">...
u'\\n...\\n...<div class="pagination">...
>>>
>>> t = Template("{% load pagination_tags %}{% autopaginate var %}{% paginate %}")
>>> t.render(Context({'var': range(21), 'request': HttpRequest()}))
u'\\n\\n<div class="pagination">...
u'\\n...\\n...<div class="pagination">...
>>> t = Template("{% load pagination_tags %}{% autopaginate var 20 %}{% paginate %}")
>>> t.render(Context({'var': range(21), 'request': HttpRequest()}))
u'\\n\\n<div class="pagination">...
u'\\n...\\n...<div class="pagination">...
>>> t = Template("{% load pagination_tags %}{% autopaginate var by %}{% paginate %}")
>>> t.render(Context({'var': range(21), 'by': 20, 'request': HttpRequest()}))
u'\\n\\n<div class="pagination">...<a href="?page=2"...
u'\\n...\\n...<div class="pagination">...<a href="?page=2"...
>>> t = Template("{% load pagination_tags %}{% autopaginate var by as foo %}{{ foo }}")
>>> t.render(Context({'var': range(21), 'by': 20, 'request': HttpRequest()}))
u'[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]'
>>>
>>> t = Template("{% load pagination_tags %}{% autopaginate var2 by as foo2 %}{% paginate %}{% autopaginate var by as foo %}{% paginate %}")
>>> t.render(Context({'var': range(21), 'var2': range(50, 121), 'by': 20, 'request': HttpRequest()}))
u'\\n\\n<div class="pagination">...<a href="?page_var2=2"...<a href="?page_var=2"...
u'\\n...\\n...<div class="pagination">...<a href="?page_var2=2"...<a href="?page_var=2"...
>>>
# Testing InfinitePaginator
Expand Down

0 comments on commit 2918ede

Please sign in to comment.