Mercurial > piecrust2
comparison tests/mockutil.py @ 805:fd694f1297c7
config: Cleanup config loading code. Add support for a `local.yml` config.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 10 Oct 2016 21:41:59 -0700 |
parents | e7b865f8f335 |
children | 72f17534d58e |
comparison
equal
deleted
inserted
replaced
804:08e6484a2600 | 805:fd694f1297c7 |
---|---|
5 from piecrust.rendering import QualifiedPage, PageRenderingContext, render_page | 5 from piecrust.rendering import QualifiedPage, PageRenderingContext, render_page |
6 | 6 |
7 | 7 |
8 def get_mock_app(config=None): | 8 def get_mock_app(config=None): |
9 app = mock.MagicMock(spec=PieCrust) | 9 app = mock.MagicMock(spec=PieCrust) |
10 app.config = PieCrustConfiguration() | 10 app.config = PieCrustConfiguration(values={}) |
11 return app | 11 return app |
12 | 12 |
13 | 13 |
14 def get_simple_page(app, rel_path): | 14 def get_simple_page(app, rel_path): |
15 source = app.getSource('pages') | 15 source = app.getSource('pages') |