Exemplo n.º 1
0
 def setUp(self):
     super(TestNiosZoneModule, self).setUp()
     self.module = MagicMock(name='ansible_collections.ansible.infoblox.plugins.modules.nios_zone.WapiModule')
     self.module.check_mode = False
     self.module.params = {'provider': None}
     self.mock_wapi = patch('ansible_collections.ansible.infoblox.plugins.modules.nios_zone.WapiModule')
     self.exec_command = self.mock_wapi.start()
     self.mock_wapi_run = patch('ansible_collections.ansible.infoblox.plugins.modules.nios_zone.WapiModule.run')
     self.mock_wapi_run.start()
     self.load_config = self.mock_wapi_run.start()
Exemplo n.º 2
0
 def setUp(self):
     self.mock_module = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json)
     self.mock_module.start()
     self.mock_sleep = patch('time.sleep')
     self.mock_sleep.start()
     set_module_args({})
     self.addCleanup(self.mock_module.stop)
     self.addCleanup(self.mock_sleep.stop)
Exemplo n.º 3
0
    def setUp(self):
        super(TestNiosApi, self).setUp()

        self.module = MagicMock(name='AnsibleModule')
        self.module.check_mode = False
        self.module.params = {'provider': None}

        self.mock_connector = patch(
            'ansible_collections.ansible.infoblox.plugins.module_utils.net_tools.nios.api.get_connector'
        )
        self.mock_connector.start()