mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-03 23:41:51 +00:00
parent
2c6746ffa0
commit
02b185932c
37 changed files with 0 additions and 171 deletions
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
|
|
@ -330,7 +329,3 @@ class TestBucketAccessKeyModule(ModuleTestCase):
|
|||
|
||||
self.assertEqual(delete_deploy_key_mock.call_count, 0)
|
||||
self.assertEqual(exec_info.exception.args[0]["changed"], True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
|
|
@ -235,7 +234,3 @@ class TestBucketPipelineKeyPairModule(ModuleTestCase):
|
|||
|
||||
self.assertEqual(delete_ssh_key_pair_mock.call_count, 0)
|
||||
self.assertEqual(exec_info.exception.args[0]["changed"], True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
|
@ -217,7 +216,3 @@ class TestBucketPipelineKnownHostModule(ModuleTestCase):
|
|||
|
||||
self.assertEqual(delete_known_host_mock.call_count, 0)
|
||||
self.assertEqual(exec_info.exception.args[0]["changed"], True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
|
|
@ -372,7 +371,3 @@ class TestBucketPipelineVariableModule(ModuleTestCase):
|
|||
|
||||
self.assertEqual(delete_pipeline_variable_mock.call_count, 0)
|
||||
self.assertEqual(exec_info.exception.args[0]["changed"], True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -325,7 +325,3 @@ class TestGithubRepo(unittest.TestCase):
|
|||
}
|
||||
)
|
||||
self.assertEqual(result["changed"], False)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import call, patch
|
||||
|
||||
|
|
@ -296,7 +295,3 @@ class TestIPAOTPConfig(ModuleTestCase):
|
|||
self.module.main()
|
||||
|
||||
self.assertEqual(exec_info.exception.args[0]["msg"], "ERROR MESSAGE")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import call, patch
|
||||
|
||||
|
|
@ -445,7 +444,3 @@ class TestIPAOTPToken(ModuleTestCase):
|
|||
self.module.main()
|
||||
|
||||
self.assertEqual(exec_info.exception.args[0]["msg"], "ERROR MESSAGE")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import call, patch
|
||||
|
||||
|
|
@ -600,7 +599,3 @@ class TestIPAPwPolicy(ModuleTestCase):
|
|||
self.module.main()
|
||||
|
||||
self.assertEqual(exec_info.exception.args[0]["msg"], "ERROR MESSAGE")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from __future__ import annotations
|
|||
|
||||
from contextlib import contextmanager
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
|
|
@ -660,7 +659,3 @@ class TestKeycloakAuthentication(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -818,7 +817,3 @@ class TestKeycloakAuthentication(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from __future__ import annotations
|
|||
|
||||
from contextlib import contextmanager
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
|
|
@ -149,7 +148,3 @@ class TestKeycloakRealm(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -629,7 +628,3 @@ class TestKeycloakRealm(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -650,7 +649,3 @@ class TestKeycloakAuthentication(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
|
@ -308,7 +307,3 @@ class TestKeycloakComponent(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from __future__ import annotations
|
|||
|
||||
from contextlib import contextmanager
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
|
|
@ -909,7 +908,3 @@ class TestKeycloakIdentityProvider(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -289,7 +288,3 @@ class TestKeycloakRealm(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -118,7 +117,3 @@ class TestKeycloakRealmRole(ModuleTestCase):
|
|||
self.module.main()
|
||||
|
||||
self.assertEqual(len(mock_get_realm_info_by_id.mock_calls), 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -358,7 +357,3 @@ class TestKeycloakRealmKeys(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
|
@ -166,7 +165,3 @@ class TestKeycloakRealmRole(ModuleTestCase):
|
|||
self.assertEqual(result["keys_metadata"], return_value[0])
|
||||
|
||||
self.assertEqual(len(mock_get_realm_keys_metadata_by_id.mock_calls), 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -699,7 +698,3 @@ class TestKeycloakClientRole(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from __future__ import annotations
|
|||
|
||||
from contextlib import contextmanager
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
|
|
@ -363,7 +362,3 @@ class TestKeycloakUser(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -115,7 +114,3 @@ class TestKeycloakUserExecuteActionsEmail(ModuleTestCase):
|
|||
self.module.main()
|
||||
data = result.exception.args[0]
|
||||
self.assertIn("User 'missing' not found", data["msg"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -512,7 +511,3 @@ class TestKeycloakUserFederation(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -696,7 +695,3 @@ class TestKeycloakUserprofile(ModuleTestCase):
|
|||
|
||||
# Verify that the module's changed status matches what is expected
|
||||
self.assertIs(exec_info.exception.args[0]["changed"], changed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -113,7 +113,3 @@ class EnclosureInfoSpec(unittest.TestCase, FactsParamsTestCase):
|
|||
self.enclosures.get_utilization.assert_called_once_with(
|
||||
PRESENT_ENCLOSURES[0]["uri"], fields="AveragePower", filter=date_filter, view="day", refresh=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -356,7 +356,3 @@ class EthernetNetworkModuleSpec(unittest.TestCase, OneViewBaseTestCase):
|
|||
ansible_facts=dict(ethernet_network=resource_data),
|
||||
msg=EthernetNetworkModule.MSG_ALREADY_PRESENT,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -83,7 +83,3 @@ class EthernetNetworkInfoSpec(unittest.TestCase, FactsParamsTestCase):
|
|||
enet_associated_profiles=ENET_ASSOCIATED_PROFILES,
|
||||
enet_associated_uplink_groups=ENET_ASSOCIATED_UPLINK_GROUPS,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -134,7 +134,3 @@ class FcNetworkModuleSpec(unittest.TestCase, OneViewBaseTestCase):
|
|||
self.mock_ansible_module.exit_json.assert_called_once_with(
|
||||
changed=False, ansible_facts=dict(fc_network=resource_data), msg=FcNetworkModule.MSG_ALREADY_PRESENT
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -38,7 +38,3 @@ class FcNetworkInfoSpec(unittest.TestCase, FactsParamsTestCase):
|
|||
FcNetworkInfoModule().run()
|
||||
|
||||
self.mock_ansible_module.exit_json.assert_called_once_with(changed=False, fc_networks=PRESENT_NETWORKS)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -134,7 +134,3 @@ class FcoeNetworkSpec(unittest.TestCase, OneViewBaseTestCase):
|
|||
self.mock_ansible_module.exit_json.assert_called_once_with(
|
||||
changed=False, ansible_facts=dict(fcoe_network=resource_data), msg=FcoeNetworkModule.MSG_ALREADY_PRESENT
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -39,7 +39,3 @@ class FcoeNetworkInfoSpec(unittest.TestCase, FactsParamsTestCase):
|
|||
FcoeNetworkInfoModule().run()
|
||||
|
||||
self.mock_ansible_module.exit_json.assert_called_once_with(changed=False, fcoe_networks=PRESENT_NETWORKS)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -231,7 +231,3 @@ class LogicalInterconnectGroupGeneralSpec(unittest.TestCase, OneViewBaseTestCase
|
|||
ansible_facts=dict(logical_interconnect_group=resource_data),
|
||||
msg=LogicalInterconnectGroupModule.MSG_ALREADY_PRESENT,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -50,7 +50,3 @@ class LogicalInterconnectGroupInfoSpec(unittest.TestCase, FactsParamsTestCase):
|
|||
self.mock_ansible_module.exit_json.assert_called_once_with(
|
||||
changed=False, logical_interconnect_groups=(PRESENT_LIGS)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -158,7 +158,3 @@ class NetworkSetModuleSpec(unittest.TestCase, OneViewBaseTestCase):
|
|||
self.mock_ansible_module.exit_json.assert_called_once_with(
|
||||
changed=False, ansible_facts=dict(network_set=resource_data), msg=NetworkSetModule.MSG_ALREADY_PRESENT
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -79,7 +79,3 @@ class NetworkSetInfoSpec(unittest.TestCase, FactsParamsTestCase):
|
|||
self.network_sets.get_all_without_ethernet.assert_called_once_with(filter=expected_filter)
|
||||
|
||||
self.mock_ansible_module.exit_json.assert_called_once_with(changed=False, network_sets=network_sets)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -212,7 +212,3 @@ class SanManagerModuleSpec(unittest.TestCase, OneViewBaseTestCase):
|
|||
msg = "A connectionInfo field is required for this operation."
|
||||
|
||||
self.mock_ansible_module.fail_json.assert_called_once_with(exception=mock.ANY, msg=msg)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -56,7 +56,3 @@ class SanManagerInfoSpec(unittest.TestCase, FactsParamsTestCase):
|
|||
SanManagerInfoModule().run()
|
||||
|
||||
self.mock_ansible_module.exit_json.assert_called_once_with(changed=False, san_managers=[])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue