def test_config_saved_after_execute(self):
config = hookenv.config()
config.implicit_save = True
foo = MagicMock()
hooks = hookenv.Hooks()
hooks.register('foo', foo)
hooks.execute(['foo', 'some', 'other', 'args'])
self.assertTrue(os.path.exists(config.path))
评论列表
文章目录