Пример #1
0
    def setUp(self):
        super(TestSlxosLldpModule, self).setUp()
        self._patch_get_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_lldp.get_config'
        )
        self._patch_load_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_lldp.load_config'
        )

        self._get_config = self._patch_get_config.start()
        self._load_config = self._patch_load_config.start()
Пример #2
0
    def setUp(self):
        super(TestSlxosVlanModule, self).setUp()
        self._patch_run_commands = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_vlan.run_commands'
        )
        self._patch_load_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_vlan.load_config'
        )

        self._run_commands = self._patch_run_commands.start()
        self._load_config = self._patch_load_config.start()
    def setUp(self):
        super(TestSlxosInterfaceModule, self).setUp()
        self._patch_get_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_interface.get_config'
        )
        self._patch_load_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_interface.load_config'
        )
        self._patch_exec_command = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_interface.exec_command'
        )

        self._get_config = self._patch_get_config.start()
        self._load_config = self._patch_load_config.start()
        self._exec_command = self._patch_exec_command.start()
    def setUp(self):
        super(TestSlxosL2InterfaceModule, self).setUp()
        self._patch_get_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_l2_interface.get_config'
        )
        self._patch_load_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_l2_interface.load_config'
        )
        self._patch_run_commands = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_l2_interface.run_commands'
        )

        self._get_config = self._patch_get_config.start()
        self._load_config = self._patch_load_config.start()
        self._run_commands = self._patch_run_commands.start()
        self._run_commands.side_effect = self.run_commands_load_fixtures
Пример #5
0
    def setUp(self):
        super(TestSlxosCommandModule, self).setUp()

        self.mock_run_commands = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_command.run_commands'
        )
        self.run_commands = self.mock_run_commands.start()
    def setUp(self):
        super(TestSlxosConfigModule, self).setUp()

        self.mock_get_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_config.get_config'
        )
        self.get_config = self.mock_get_config.start()

        self.mock_load_config = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_config.load_config'
        )
        self.load_config = self.mock_load_config.start()

        self.mock_run_commands = patch(
            'ansible_collections.extreme.slxos.plugins.modules.slxos_config.run_commands'
        )
        self.run_commands = self.mock_run_commands.start()
 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)