Mercurial > piecrust2
diff tests/test_data_assetor.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 | e7b865f8f335 |
children | 72f17534d58e |
line wrap: on
line diff
--- a/tests/test_data_assetor.py Sun Mar 06 23:41:35 2016 -0800 +++ b/tests/test_data_assetor.py Sun Mar 06 23:48:01 2016 -0800 @@ -50,7 +50,9 @@ def test_missing_asset(): with pytest.raises(KeyError): - fs = mock_fs().withPage('pages/foo/bar') + fs = (mock_fs() + .withConfig() + .withPage('pages/foo/bar')) with mock_fs_scope(fs): page = MagicMock() page.app = fs.getApp(cache=False) @@ -62,6 +64,7 @@ def test_multiple_assets_with_same_name(): with pytest.raises(UnsupportedAssetsError): fs = (mock_fs() + .withConfig() .withPage('pages/foo/bar') .withPageAsset('pages/foo/bar', 'one.txt', 'one text') .withPageAsset('pages/foo/bar', 'one.jpg', 'one picture'))