Misc. typo fixes (#4940)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2022-07-09 02:41:57 +05:30 committed by GitHub
parent 35ddf31b5f
commit bf94f08bc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 55 additions and 55 deletions

View file

@ -107,7 +107,7 @@ def test_validate_config(inventory):
}
with pytest.raises(AnsibleError) as error_message:
inventory._validate_config(config)
assert "config missing client_secret, a required paramter" in error_message
assert "config missing client_secret, a required parameter" in error_message
config = {
"client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
@ -116,7 +116,7 @@ def test_validate_config(inventory):
}
with pytest.raises(AnsibleError) as error_message:
inventory._validate_config(config)
assert "config missing client_id, a required paramter" in error_message
assert "config missing client_id, a required parameter" in error_message
def test_populate(inventory):

View file

@ -39,7 +39,7 @@ def XenAPI():
"""Imports and returns fake XenAPI module."""
# Import of fake XenAPI module is wrapped by fixture so that it does not
# affect other unit tests which could potentialy also use XenAPI module.
# affect other unit tests which could potentially also use XenAPI module.
# First we use importlib.import_module() to import the module and assign
# it to a local symbol.

View file

@ -35,7 +35,7 @@ def XenAPI():
"""Imports and returns fake XenAPI module."""
# Import of fake XenAPI module is wrapped by fixture so that it does not
# affect other unit tests which could potentialy also use XenAPI module.
# affect other unit tests which could potentially also use XenAPI module.
# First we use importlib.import_module() to import the module and assign
# it to a local symbol.

View file

@ -109,7 +109,7 @@ class TestPritunlOrg(ModuleTestCase):
idempotent_exc = idempotent_result.exception.args[0]
# Ensure both calls resulted in the same returned value
# except for changed which sould be false the second time
# except for changed which should be false the second time
for k, v in iteritems(idempotent_exc):
if k == "changed":
self.assertFalse(idempotent_exc[k])
@ -158,7 +158,7 @@ class TestPritunlOrg(ModuleTestCase):
idempotent_exc = idempotent_result.exception.args[0]
# Ensure both calls resulted in the same returned value
# except for changed which sould be false the second time
# except for changed which should be false the second time
self.assertFalse(idempotent_exc["changed"])
self.assertEqual(idempotent_exc["response"], delete_exc["response"])

View file

@ -3309,7 +3309,7 @@ def test_gsm_connection_unchanged(mocked_gsm_connection_unchanged, capfd):
@pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP4_ADDRESSES, indirect=['patch_ansible_module'])
def test_create_ethernet_with_mulitple_ip4_addresses_static(mocked_generic_connection_create, capfd):
def test_create_ethernet_with_multiple_ip4_addresses_static(mocked_generic_connection_create, capfd):
"""
Test : Create ethernet connection with static IP configuration
"""
@ -3349,7 +3349,7 @@ def test_create_ethernet_with_mulitple_ip4_addresses_static(mocked_generic_conne
@pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP6_ADDRESSES, indirect=['patch_ansible_module'])
def test_create_ethernet_with_mulitple_ip6_addresses_static(mocked_generic_connection_create, capfd):
def test_create_ethernet_with_multiple_ip6_addresses_static(mocked_generic_connection_create, capfd):
"""
Test : Create ethernet connection with multiple IPv6 addresses configuration
"""
@ -3389,7 +3389,7 @@ def test_create_ethernet_with_mulitple_ip6_addresses_static(mocked_generic_conne
@pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP4_ADDRESSES, indirect=['patch_ansible_module'])
def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip4_addresses_unchanged, capfd):
def test_ethernet_connection_static_with_multiple_ip4_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip4_addresses_unchanged, capfd):
"""
Test : Ethernet connection with static IP configuration unchanged
"""
@ -3403,7 +3403,7 @@ def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked
@pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP6_ADDRESSES, indirect=['patch_ansible_module'])
def test_ethernet_connection_static_with_mulitple_ip6_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip6_addresses_unchanged, capfd):
def test_ethernet_connection_static_with_multiple_ip6_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip6_addresses_unchanged, capfd):
"""
Test : Ethernet connection with multiple IPv6 addresses configuration unchanged
"""
@ -3485,7 +3485,7 @@ def test_create_ethernet_addr_gen_mode_and_ip6_privacy_static(mocked_generic_con
@pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_IP6_PRIVACY_AND_ADDR_GEN_MODE, indirect=['patch_ansible_module'])
def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked_ethernet_connection_static_ip6_privacy_and_addr_gen_mode_unchange, capfd):
def test_ethernet_connection_static_with_multiple_ip4_addresses_unchanged(mocked_ethernet_connection_static_ip6_privacy_and_addr_gen_mode_unchange, capfd):
"""
Test : Ethernet connection with static IP configuration unchanged
"""

View file

@ -37,7 +37,7 @@ class TestSlackModule(ModuleTestCase):
with self.assertRaises(AnsibleFailJson):
self.module.main()
def test_sucessful_message(self):
def test_successful_message(self):
"""tests sending a message. This is example 1 from the docs"""
set_module_args({
'token': 'XXXX/YYYY/ZZZZ',

View file

@ -19,7 +19,7 @@ TESTED_MODULE = cpanm.__name__
@pytest.fixture
def patch_cpanm(mocker):
"""
Function used for mocking some parts of redhat_subscribtion module
Function used for mocking some parts of redhat_subscription module
"""
mocker.patch('ansible_collections.community.general.plugins.module_utils.module_helper.AnsibleModule.get_bin_path',
return_value='/testbin/cpanm')

View file

@ -3,7 +3,7 @@
## Tests structure
- `input` directory contains interfaces configuration files
- `test_interfaces_file.py` runs each hardcoded test agains all configurations in `input` directory and compares results with golden outputs in `golden_output`
- `test_interfaces_file.py` runs each hardcoded test against all configurations in `input` directory and compares results with golden outputs in `golden_output`
## Running unit tests with docker

View file

@ -17,7 +17,7 @@ TESTED_MODULE = gconftool2_info.__name__
@pytest.fixture
def patch_gconftool2_info(mocker):
"""
Function used for mocking some parts of redhat_subscribtion module
Function used for mocking some parts of redhat_subscription module
"""
mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path',
return_value='/testbin/gconftool-2')

View file

@ -19,7 +19,7 @@ TESTED_MODULE = xfconf.__name__
@pytest.fixture
def patch_xfconf(mocker):
"""
Function used for mocking some parts of redhat_subscribtion module
Function used for mocking some parts of redhat_subscription module
"""
mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path',
return_value='/testbin/xfconf-query')

View file

@ -16,7 +16,7 @@ TESTED_MODULE = xfconf_info.__name__
@pytest.fixture
def patch_xfconf_info(mocker):
"""
Function used for mocking some parts of redhat_subscribtion module
Function used for mocking some parts of redhat_subscription module
"""
mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path',
return_value='/testbin/xfconf-query')