1
0
Fork 0
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:
Matt Martz 2016-06-10 15:26:05 -05:00 committed by GitHub
commit a1a4a0f77e

View file

@ -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