[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

@@ -589,7 +589,7 @@ def get_archive(module):
return TarArchive(module)
def main():
def create_module() -> AnsibleModule:
module = AnsibleModule(
argument_spec=dict(
path=dict(type="list", elements="path", required=True),
@@ -603,6 +603,11 @@ def main():
add_file_common_args=True,
supports_check_mode=True,
)
return module
def main():
module = create_module()
check_mode = module.check_mode