test: remove unused tests
All checks were successful
pull-requests-open / Check commit compliance (pull_request) Successful in 6s
pull-requests-open / Run tests (pull_request) Successful in 8s

This commit is contained in:
Bertrand Lanson 2024-09-15 15:38:00 +02:00
parent 2df6309bf1
commit ab996acb36
Signed by: lanson
SSH Key Fingerprint: SHA256:/nqc6HGqld/PS208F6FUOvZlUzTS0rGpNNwR5O2bQBw

View File

@ -1,7 +1,7 @@
import unittest
import json
import pytest
from unittest.mock import patch, MagicMock
import json
from unittest.mock import patch, MagicMock, Mock
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils import basic
from ansible.module_utils.common.text.converters import to_bytes
@ -90,53 +90,6 @@ class TestPublicCloudConfigInfoModule(unittest.TestCase):
changed=False, config=api_response_data["data"]
)
# def test_successful_retrieval(self):
# """
# Test a successful retrieval of public cloud configuration.
# """
# set_module_args(
# {
# "api_token": "mock_api_token",
# "account_id": "mock_account_id",
# }
# )
#
# api_response_data = {
# "result": "success",
# "data": {
# "free_tier": 300,
# "free_tier_used": 24.34,
# "account_resource_level": 2,
# "valid_from": 1707584356,
# "valid_to": 1717192799,
# "project_count": 2,
# },
# }
#
# self.mock_client_instance.get.return_value = api_response_data
#
# with patch.object(
# AnsibleModule, "exit_json", side_effect=exit_json
# ) as mock_exit_json:
# with patch.object(
# AnsibleModule, "fail_json", side_effect=fail_json
# ) as mock_fail_json:
# with pytest.raises(AnsibleExitJson) as e:
# public_cloud_config_info.main()
# mock_fail_json.assert_not_called()
# result = e.value.kwargs
# assert result["changed"] is False
# assert "config" in result
# assert result["config"] == api_response_data["data"]
# mock_exit_json.assert_called_once()
# self.mock_client_class.assert_called_with(
# api_version="1", api_token="mock_api_token"
# )
# self.mock_client_instance.get.assert_called_once_with(
# "/public_clouds/config",
# params={"account_id": "mock_account_id"},
# )
def test_missing_required_params(self):
"""
Test behavior when required parameters are missing.