Mercurial > piecrust2
diff tests/test_appconfig.py @ 711:ab5c6a8ae90a
bake: Replace hard-coded taxonomy support with "generator" system.
* Taxonomies are now implemented one or more `TaxonomyGenerator`s.
* A `BlogArchivesGenerator` stub is there but non-functional.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 26 May 2016 19:52:47 -0700 |
parents | 15b5181b2e42 |
children | fd694f1297c7 |
line wrap: on
line diff
--- a/tests/test_appconfig.py Thu May 26 19:46:28 2016 -0700 +++ b/tests/test_appconfig.py Thu May 26 19:52:47 2016 -0700 @@ -49,12 +49,11 @@ with mock_fs_scope(fs): app = fs.getApp() # The order of routes is important. Sources, not so much. - # `posts` shows up 3 times in routes (posts, tags, categories) assert (list( map( - lambda v: v['source'], + lambda v: v.get('generator') or v['source'], app.config.get('site/routes'))) == - ['notes', 'posts', 'posts', 'posts', 'pages', 'theme_pages']) + ['notes', 'posts', 'posts_archives', 'posts_tags', 'posts_categories', 'pages', 'theme_pages']) assert list(app.config.get('site/sources').keys()) == [ 'theme_pages', 'pages', 'posts', 'notes'] @@ -77,9 +76,9 @@ # `posts` shows up 3 times in routes (posts, tags, categories) assert (list( map( - lambda v: v['source'], + lambda v: v.get('generator') or v['source'], app.config.get('site/routes'))) == - ['notes', 'posts', 'posts', 'posts', 'pages', 'theme_notes', 'theme_pages']) + ['notes', 'posts', 'posts_archives', 'posts_tags', 'posts_categories', 'pages', 'theme_notes', 'theme_pages']) assert list(app.config.get('site/sources').keys()) == [ 'theme_pages', 'theme_notes', 'pages', 'posts', 'notes']