mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #16233 from dagwieers/module-name
Fix unit tests for module_name #16087
This commit is contained in:
commit
a1a4a0f77e
1 changed files with 4 additions and 0 deletions
|
@ -53,6 +53,7 @@ class TestAnsibleModuleSysLogSmokeTest(unittest.TestCase):
|
||||||
self.am = ansible.module_utils.basic.AnsibleModule(
|
self.am = ansible.module_utils.basic.AnsibleModule(
|
||||||
argument_spec = dict(),
|
argument_spec = dict(),
|
||||||
)
|
)
|
||||||
|
self.am._name = 'unittest'
|
||||||
|
|
||||||
self.has_journal = ansible.module_utils.basic.has_journal
|
self.has_journal = ansible.module_utils.basic.has_journal
|
||||||
if self.has_journal:
|
if self.has_journal:
|
||||||
|
@ -90,6 +91,7 @@ class TestAnsibleModuleJournaldSmokeTest(unittest.TestCase):
|
||||||
self.am = ansible.module_utils.basic.AnsibleModule(
|
self.am = ansible.module_utils.basic.AnsibleModule(
|
||||||
argument_spec = dict(),
|
argument_spec = dict(),
|
||||||
)
|
)
|
||||||
|
self.am._name = 'unittest'
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
# unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
|
# unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
|
||||||
|
@ -138,6 +140,7 @@ class TestAnsibleModuleLogSyslog(unittest.TestCase):
|
||||||
self.am = ansible.module_utils.basic.AnsibleModule(
|
self.am = ansible.module_utils.basic.AnsibleModule(
|
||||||
argument_spec = dict(),
|
argument_spec = dict(),
|
||||||
)
|
)
|
||||||
|
self.am._name = 'unittest'
|
||||||
|
|
||||||
self.has_journal = ansible.module_utils.basic.has_journal
|
self.has_journal = ansible.module_utils.basic.has_journal
|
||||||
if self.has_journal:
|
if self.has_journal:
|
||||||
|
@ -199,6 +202,7 @@ class TestAnsibleModuleLogJournal(unittest.TestCase):
|
||||||
self.am = ansible.module_utils.basic.AnsibleModule(
|
self.am = ansible.module_utils.basic.AnsibleModule(
|
||||||
argument_spec = dict(),
|
argument_spec = dict(),
|
||||||
)
|
)
|
||||||
|
self.am._name = 'unittest'
|
||||||
|
|
||||||
self.has_journal = ansible.module_utils.basic.has_journal
|
self.has_journal = ansible.module_utils.basic.has_journal
|
||||||
ansible.module_utils.basic.has_journal = True
|
ansible.module_utils.basic.has_journal = True
|
||||||
|
|
Loading…
Reference in a new issue