Fix more typos (#7439)

* Fix more typos in plugins/.

* Fix typos in tests/unit/.

* Fix typos in tests/integration/.

* Fix more typos.

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

---------

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
This commit is contained in:
Felix Fontein 2023-10-29 18:04:44 +01:00 committed by GitHub
parent f7532c7d9d
commit 2b62826082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 99 additions and 99 deletions

View file

@ -12,7 +12,7 @@ from ansible.plugins.loader import become_loader, get_shell_plugin
def call_become_plugin(task, var_options, cmd, executable=None):
"""Helper function to call become plugin simiarly on how Ansible itself handles this."""
"""Helper function to call become plugin similarly on how Ansible itself handles this."""
plugin = become_loader.get(task['become_method'])
plugin.set_options(task_keys=task, var_options=var_options)
shell = get_shell_plugin(executable=executable)

View file

@ -78,6 +78,6 @@ class TestLookupModule(unittest.TestCase):
@patch('ansible_collections.community.general.plugins.lookup.bitwarden_secrets_manager._bitwarden_secrets_manager', new=MockBitwardenSecretsManager())
def test_bitwarden_secrets_manager_no_match(self):
# Getting a nonexistant secret id throws exception
# Getting a nonexistent secret id throws exception
with self.assertRaises(AnsibleLookupError):
self.lookup.run(['nonexistant_id'], bws_access_token='123')

View file

@ -89,7 +89,7 @@ class TestDNSimple_Info(ModuleTestCase):
result = exc_info.exception.args[0]
# nothing should change
self.assertFalse(result['changed'])
# we should return at least one item with mathing domain
# we should return at least one item with matching domain
assert result['dnsimple_records_info'][0]['name'] == name
@with_httmock(records_resp)

View file

@ -69,7 +69,7 @@ class TestGem(ModuleTestCase):
assert result['msg'] == "install_dir requires user_install=false"
def test_passes_install_dir_to_gem(self):
# XXX: This test is extremely fragile, and makes assuptions about the module code, and how
# XXX: This test is extremely fragile, and makes assumptions about the module code, and how
# functions are run.
# If you start modifying the code of the module, you might need to modify what this
# test mocks. The only thing that matters is the assertion that this 'gem install' is

View file

@ -152,7 +152,7 @@ class TestUnloadModule(ModuleTestCase):
class TestModuleIsLoadedPersistently(ModuleTestCase):
def setUp(self):
if (sys.version_info[0] == 3 and sys.version_info[1] < 7) or (sys.version_info[0] == 2 and sys.version_info[1] < 7):
self.skipTest('open_mock doesnt support readline in earlier python versions')
self.skipTest("open_mock doesn't support readline in earlier python versions")
super(TestModuleIsLoadedPersistently, self).setUp()
@ -230,7 +230,7 @@ class TestModuleIsLoadedPersistently(ModuleTestCase):
class TestPermanentParams(ModuleTestCase):
def setUp(self):
if (sys.version_info[0] == 3 and sys.version_info[1] < 7) or (sys.version_info[0] == 2 and sys.version_info[1] < 7):
self.skipTest('open_mock doesnt support readline in earlier python versions')
self.skipTest("open_mock doesn't support readline in earlier python versions")
super(TestPermanentParams, self).setUp()
self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path')

View file

@ -54,9 +54,9 @@ class PagerDutyTest(unittest.TestCase):
def _assert_create_window_payload(self, module, url, headers, data=None, method=None):
payload = json.loads(data)
window_data = payload['maintenance_window']
self.assertTrue('start_time' in window_data, '"start_time" is requiered attribute')
self.assertTrue('end_time' in window_data, '"end_time" is requiered attribute')
self.assertTrue('services' in window_data, '"services" is requiered attribute')
self.assertTrue('start_time' in window_data, '"start_time" is required attribute')
self.assertTrue('end_time' in window_data, '"end_time" is required attribute')
self.assertTrue('services' in window_data, '"services" is required attribute')
return object(), {'status': 201}
def _assert_create_window_single_service(self, module, url, headers, data=None, method=None):

View file

@ -89,7 +89,7 @@ Enabled: %s
Enable the specified IDs.
'repo_ids' can be either a string or a list of strings representing
an ID (wilcard included).
an ID (wildcard included).
Returns the same object, so calls to this can be chained.
"""
@ -104,7 +104,7 @@ Enabled: %s
Disable the specified IDs.
'repo_ids' can be either a string or a list of strings representing
an ID (wilcard included).
an ID (wildcard included).
Returns the same object, so calls to this can be chained.
"""