##// END OF EJS Templates
tests: Use settings dict from fixture instead of grabbing it from the WSGI app stack.
Martin Bornhold -
r603:4f5ebd99 default
parent child Browse files
Show More
@@ -284,12 +284,11 b' class TestInitializeGenerator:'
284
284
285
285
286 class TestPrepareHooksDaemon(object):
286 class TestPrepareHooksDaemon(object):
287 def test_calls_imported_prepare_callback_daemon(self, pylonsapp):
287 def test_calls_imported_prepare_callback_daemon(self, app_settings):
288 settings = pylonsapp.application.config
289 expected_extras = {'extra1': 'value1'}
288 expected_extras = {'extra1': 'value1'}
290 daemon = DummyHooksCallbackDaemon()
289 daemon = DummyHooksCallbackDaemon()
291
290
292 controller = StubVCSController(None, settings, None)
291 controller = StubVCSController(None, app_settings, None)
293 prepare_patcher = mock.patch.object(
292 prepare_patcher = mock.patch.object(
294 simplevcs, 'prepare_callback_daemon',
293 simplevcs, 'prepare_callback_daemon',
295 return_value=(daemon, expected_extras))
294 return_value=(daemon, expected_extras))
@@ -298,8 +297,8 b' class TestPrepareHooksDaemon(object):'
298 expected_extras.copy())
297 expected_extras.copy())
299 prepare_mock.assert_called_once_with(
298 prepare_mock.assert_called_once_with(
300 expected_extras,
299 expected_extras,
301 protocol=settings['vcs.hooks.protocol'],
300 protocol=app_settings['vcs.hooks.protocol'],
302 use_direct_calls=settings['vcs.hooks.direct_calls'])
301 use_direct_calls=app_settings['vcs.hooks.direct_calls'])
303
302
304 assert callback_daemon == daemon
303 assert callback_daemon == daemon
305 assert extras == extras
304 assert extras == extras
General Comments 0
You need to be logged in to leave comments. Login now