mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
kubevirt: Re-enable unit tests (#1070)
Fixes: #1064 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
873f1fb7fd
commit
f7656ac0d3
3 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ __metaclass__ = type
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.tests.unit.compat.mock import MagicMock
|
from ansible_collections.community.general.tests.unit.compat.mock import MagicMock
|
||||||
|
|
||||||
from ansible_collections.community.kubernetes.plugins.module_utils.common import K8sAnsibleMixin
|
from ansible_collections.community.kubernetes.plugins.module_utils.common import K8sAnsibleMixin
|
||||||
|
@ -52,9 +53,9 @@ def fail_json(*args, **kwargs):
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
def base_fixture(monkeypatch):
|
def base_fixture(monkeypatch):
|
||||||
monkeypatch.setattr(
|
monkeypatch.setattr(
|
||||||
KubernetesRawModule, "exit_json", exit_json)
|
AnsibleModule, "exit_json", exit_json)
|
||||||
monkeypatch.setattr(
|
monkeypatch.setattr(
|
||||||
KubernetesRawModule, "fail_json", fail_json)
|
AnsibleModule, "fail_json", fail_json)
|
||||||
# Create mock methods in Resource directly, otherwise dyn client
|
# Create mock methods in Resource directly, otherwise dyn client
|
||||||
# tries binding those to corresponding methods in DynamicClient
|
# tries binding those to corresponding methods in DynamicClient
|
||||||
# (with partial()), which is more problematic to intercept
|
# (with partial()), which is more problematic to intercept
|
||||||
|
|
Loading…
Reference in a new issue