mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
[PR #9838/a1781d09 backport][stable-10] Unit tests: make set_module_args() a context manager, and remove copies of it in some tests (#9839)
Unit tests: make set_module_args() a context manager, and remove copies of it in some tests (#9838)
Make set_module_args() a context manager, and remove copies of set_module_args().
Prepares for Data Tagging.
(cherry picked from commit a1781d09dd)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -18,5 +18,5 @@ if not linode.HAS_LINODE:
|
||||
|
||||
def test_name_is_a_required_parameter(api_key, auth):
|
||||
with pytest.raises(SystemExit):
|
||||
set_module_args({})
|
||||
linode.main()
|
||||
with set_module_args({}):
|
||||
linode.main()
|
||||
|
||||
Reference in New Issue
Block a user