[PR #11235/fb2f34ba backport][stable-12] Stop re-defining the argument spec in unit tests (#11239)

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

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

* Shut up linter.

(cherry picked from commit fb2f34ba85)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2025-12-01 07:21:24 +01:00
committed by GitHub
parent 3033dfa27c
commit a2c7f9f89a
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)