Mercurial > piecrust2
diff tests/test_data_iterators.py @ 729:e35407c60e00
templating: Make blog archives generator expose more templating data.
In addition to pagination data, also expose a non-paginating iterator that
lists all posts in a source by chronological order.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 01 Jun 2016 22:09:21 -0700 |
parents | 4379d8f8f831 |
children |
line wrap: on
line diff
--- a/tests/test_data_iterators.py Mon May 30 20:45:27 2016 -0700 +++ b/tests/test_data_iterators.py Wed Jun 01 22:09:21 2016 -0700 @@ -72,7 +72,8 @@ page = mock.MagicMock(spec=Page) page.config = PageConfiguration() page.config.set('threes', {'is_foo': 3}) - it = PageIterator([TestItem(v) for v in [3, 2, 3, 1, 4, 3]], page) + it = PageIterator([TestItem(v) for v in [3, 2, 3, 1, 4, 3]], + current_page=page) it.filter('threes') assert it.total_count == 3 assert len(it) == 3