@mock.patch('certbot._internal.main.util')
def test_it(self, mock_util):
    main.make_or_verify_needed_dirs(self.config)
    for core_dir in (self.config.config_dir, self.config.work_dir):
        mock_util.set_up_core_dir.assert_any_call(core_dir, constants.CONFIG_DIRS_MODE, self.config.strict_permissions)
    hook_dirs = (self.config.renewal_pre_hooks_dir, self.config.renewal_deploy_hooks_dir, self.config.renewal_post_hooks_dir)
    for hook_dir in hook_dirs:
        mock_util.make_or_verify_dir.assert_any_call(hook_dir, strict=self.config.strict_permissions)
@mock.patch('certbot._internal.main.util')
def test_it(self, mock_util):
    main.make_or_verify_needed_dirs(self.config)
    for core_dir in (self.config.config_dir, self.config.work_dir):
        mock_util.set_up_core_dir.assert_any_call(core_dir, constants.CONFIG_DIRS_MODE, self.config.strict_permissions)
    hook_dirs = (self.config.renewal_pre_hooks_dir, self.config.renewal_deploy_hooks_dir, self.config.renewal_post_hooks_dir)
    for hook_dir in hook_dirs:
        mock_util.make_or_verify_dir.assert_any_call(hook_dir, strict=self.config.strict_permissions)