Mercurial > piecrust2
diff tests/conftest.py @ 666:81d9c3a3a0b5
internal: Get rid of the whole "sub cache" business.
* Compute cache keys up front, so the cache directory is only chosen once.
* Buffer up config variants to apply before loading the config. Makes it
possible to cache variant-resulting configs, too.
* Make a factory class to reuse the logic that creates the `PieCrust` object
correctly for multi-process workers and such.
* Add a test.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 03 Mar 2016 08:22:41 -0800 |
parents | 5dc13c816045 |
children | d6403c21bdea |
line wrap: on
line diff
--- a/tests/conftest.py Thu Mar 03 08:19:28 2016 -0800 +++ b/tests/conftest.py Thu Mar 03 08:22:41 2016 -0800 @@ -322,9 +322,11 @@ from werkzeug.test import Client from werkzeug.wrappers import BaseResponse + from piecrust.app import PieCrustFactory from piecrust.serving.server import Server with mock_fs_scope(fs): - server = Server(fs.path('/kitchen')) + appfactory = PieCrustFactory(fs.path('/kitchen')) + server = Server(appfactory) test_app = self._TestApp(server) client = Client(test_app, BaseResponse) resp = client.get(url)