Mercurial > piecrust2
comparison tests/test_serving.py @ 674:f987b29d6fab
tests: Add ability to run tests with a theme site.
* Remove automatic creating of `config.yml`.
* Add option to specify `theme_config` in YAML tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 06 Mar 2016 23:48:01 -0800 |
parents | 64e696adb99e |
children | ab5c6a8ae90a |
comparison
equal
deleted
inserted
replaced
673:d6403c21bdea | 674:f987b29d6fab |
---|---|
63 c = {'title': 'Post %d' % (i + 1)} | 63 c = {'title': 'Post %d' % (i + 1)} |
64 c['tags'] = list(tags[i]) | 64 c['tags'] = list(tags[i]) |
65 return c | 65 return c |
66 | 66 |
67 fs = (mock_fs() | 67 fs = (mock_fs() |
68 .withConfig() | |
68 .withPages(8, 'posts/2015-03-{idx1:02}_post{idx1:02}.md', | 69 .withPages(8, 'posts/2015-03-{idx1:02}_post{idx1:02}.md', |
69 config_factory) | 70 config_factory) |
70 .withPage('pages/_tag.md', {'layout': 'none', 'format': 'none'}, | 71 .withPage('pages/_tag.md', {'layout': 'none', 'format': 'none'}, |
71 "Pages in {{tag}}\n" | 72 "Pages in {{tag}}\n" |
72 "{%for p in pagination.posts -%}\n" | 73 "{%for p in pagination.posts -%}\n" |
106 if categories[i]: | 107 if categories[i]: |
107 c['category'] = categories[i] | 108 c['category'] = categories[i] |
108 return c | 109 return c |
109 | 110 |
110 fs = (mock_fs() | 111 fs = (mock_fs() |
112 .withConfig() | |
111 .withPages(6, 'posts/2015-03-{idx1:02}_post{idx1:02}.md', | 113 .withPages(6, 'posts/2015-03-{idx1:02}_post{idx1:02}.md', |
112 config_factory) | 114 config_factory) |
113 .withPage('pages/_category.md', {'layout': 'none', 'format': 'none'}, | 115 .withPage('pages/_category.md', {'layout': 'none', 'format': 'none'}, |
114 "Pages in {{category}}\n" | 116 "Pages in {{category}}\n" |
115 "{%for p in pagination.posts -%}\n" | 117 "{%for p in pagination.posts -%}\n" |