Mercurial > piecrust2
comparison tests/test_data_provider.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 | 4b1019bb2533 |
children | ab5c6a8ae90a |
comparison
equal
deleted
inserted
replaced
673:d6403c21bdea | 674:f987b29d6fab |
---|---|
2 from .mockutil import mock_fs, mock_fs_scope | 2 from .mockutil import mock_fs, mock_fs_scope |
3 | 3 |
4 | 4 |
5 def test_blog_provider(): | 5 def test_blog_provider(): |
6 fs = (mock_fs() | 6 fs = (mock_fs() |
7 .withConfig() | |
7 .withPage('posts/2015-03-01_one.md', | 8 .withPage('posts/2015-03-01_one.md', |
8 {'title': 'One', 'category': 'Foo'}) | 9 {'title': 'One', 'category': 'Foo'}) |
9 .withPage('posts/2015-03-02_two.md', | 10 .withPage('posts/2015-03-02_two.md', |
10 {'title': 'Two', 'category': 'Foo'}) | 11 {'title': 'Two', 'category': 'Foo'}) |
11 .withPage('posts/2015-03-03_three.md', | 12 .withPage('posts/2015-03-03_three.md', |