gitlab_hook: renaming module name (#51979)

* gitlab_hook: renaming module name

* gitlab_hook: rename module in documentation

* gitlab_hook: remove plural in docs and code

* gitlab_hook: fix unit test functions
This commit is contained in:
Guillaume Martinez
2019-02-11 00:30:36 +01:00
committed by Dag Wieers
parent 07cff73719
commit 7b84c0ee80
3 changed files with 12 additions and 11 deletions

View File

@@ -5,7 +5,7 @@
from __future__ import absolute_import
from ansible.modules.source_control.gitlab_hooks import GitLabHook
from ansible.modules.source_control.gitlab_hook import GitLabHook
from .gitlab import (GitlabModuleTestCase,
python_version_match_requirement,
@@ -31,11 +31,11 @@ class TestGitlabHook(GitlabModuleTestCase):
def test_hook_exist(self):
project = self.gitlab_instance.projects.get(1)
rvalue = self.moduleUtil.existsHooks(project, "http://example.com/hook")
rvalue = self.moduleUtil.existsHook(project, "http://example.com/hook")
self.assertEqual(rvalue, True)
rvalue = self.moduleUtil.existsHooks(project, "http://gitlab.com/hook")
rvalue = self.moduleUtil.existsHook(project, "http://gitlab.com/hook")
self.assertEqual(rvalue, False)
@@ -72,7 +72,7 @@ class TestGitlabHook(GitlabModuleTestCase):
def test_delete_hook(self):
project = self.gitlab_instance.projects.get(1)
self.moduleUtil.existsHooks(project, "http://example.com/hook")
self.moduleUtil.existsHook(project, "http://example.com/hook")
rvalue = self.moduleUtil.deleteHook()