mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
* Move Proxmox `HAS_PROXMOXER` check into `module_utils`.
* Fix tests.
* Fix typo.
* Update changelog entry.
(cherry picked from commit 761fbe4fa3
)
Co-authored-by: Markus Reiter <me@reitermark.us>
This commit is contained in:
parent
a477044fb7
commit
9e6df4f1c9
9 changed files with 16 additions and 24 deletions
|
@ -12,6 +12,7 @@ import pytest
|
|||
import json
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.cloud.misc import proxmox_tasks_info
|
||||
import ansible_collections.community.general.plugins.module_utils.proxmox as proxmox_utils
|
||||
from ansible_collections.community.general.plugins.module_utils.proxmox import ProxmoxAnsible
|
||||
from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, patch
|
||||
from ansible_collections.community.general.tests.unit.plugins.modules.utils import (
|
||||
|
@ -144,7 +145,7 @@ def test_get_tasks(connect_mock, capfd, mocker):
|
|||
return m
|
||||
|
||||
connect_mock.side_effect = f
|
||||
proxmox_tasks_info.HAS_PROXMOXER = True
|
||||
proxmox_utils.HAS_PROXMOXER = True
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
proxmox_tasks_info.main()
|
||||
|
@ -170,7 +171,7 @@ def test_get_single_task(connect_mock, capfd, mocker):
|
|||
return m
|
||||
|
||||
connect_mock.side_effect = f
|
||||
proxmox_tasks_info.HAS_PROXMOXER = True
|
||||
proxmox_utils.HAS_PROXMOXER = True
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
proxmox_tasks_info.main()
|
||||
|
@ -197,7 +198,7 @@ def test_get_non_existent_task(connect_mock, capfd, mocker):
|
|||
return m
|
||||
|
||||
connect_mock.side_effect = f
|
||||
proxmox_tasks_info.HAS_PROXMOXER = True
|
||||
proxmox_utils.HAS_PROXMOXER = True
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
proxmox_tasks_info.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue