view tests/mockutil.py @ 4:7dc71c2dc9a8

Added requirements file for `pip`.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 11 Aug 2014 22:36:36 -0700
parents f485ba500df3
children f5ca5c5bed85
line wrap: on
line source

import mock
from piecrust.app import PieCrust, PieCrustConfiguration


def get_mock_app(config=None):
    app = mock.MagicMock(spec=PieCrust)
    app.config = PieCrustConfiguration()
    return app