1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-05 03:37:01 +00:00

Stop re-defining the argument spec in unit tests (#11235)

* Stop re-defining the argument spec in unit tests.

* Shut up linter.
This commit is contained in:
Felix Fontein 2025-12-01 06:59:23 +01:00 committed by GitHub
parent 6365b5a981
commit fb2f34ba85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 35 additions and 274 deletions

View file

@ -2675,8 +2675,7 @@ class Nmcli:
return self._compare_conn_params(self.show_connection(), options)
def main():
# Parsing argument file
def create_module() -> AnsibleModule:
module = AnsibleModule(
argument_spec=dict(
ignore_unsupported_suboptions=dict(type="bool", default=False),
@ -2870,6 +2869,12 @@ def main():
supports_check_mode=True,
)
module.run_command_environ_update = dict(LANG="C", LC_ALL="C", LC_MESSAGES="C", LC_CTYPE="C")
return module
def main():
# Parsing argument file
module = create_module()
nmcli = Nmcli(module)