-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Stop re-defining the argument spec in unit tests #11235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @Mogztter @alcamie101 @bendoh @quidame |
This comment was marked as outdated.
This comment was marked as outdated.
russoz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hurraaaaaaayyyyyyyy!
That was a sneaky way of solving the issue, but it does the job. Thanks!!!
| from ansible.module_utils.common.text.converters import to_text | ||
| from ansible_collections.community.general.plugins.modules import nmcli | ||
| from ansible.module_utils.basic import AnsibleModule | ||
| from ansible.module_utils.basic import AnsibleModule # noqa: F401 # pylint: disable=unused-import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this import being kept at all, since it is unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some mock patches further below that refer to names in here. From my experience they tend to not work when the code wasn't imported this way.
Backport to stable-11: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply fb2f34b on top of patchback/backports/stable-11/fb2f34ba8593f5718c20ca663dd48f78f32df660/pr-11235 Backporting merged PR #11235 into main
🤖 @patchback |
Backport to stable-12: 💚 backport PR created✅ Backport PR branch: Backported as #11239 🤖 @patchback |
|
@russoz thanks for reviewing! |
* Stop re-defining the argument spec in unit tests. * Shut up linter. (cherry picked from commit fb2f34b)
…t 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 fb2f34b) Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
DRY.
Ref: #11182 (comment)
ISSUE TYPE
COMPONENT NAME
archive unit tests
java_keystore unit tests
nmlci unit tests