mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-02 08:22:52 +00:00
[stable-9] Unit tests: make set_module_args() a context manager, and remove copies of it in some tests (#9840)
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)
This commit is contained in:
parent
9a6bd80613
commit
013fb9c006
80 changed files with 3745 additions and 3977 deletions
|
|
@ -38,8 +38,8 @@ class TestDNSimple(ModuleTestCase):
|
|||
def test_without_required_parameters(self):
|
||||
"""Failure must occurs when all parameters are missing"""
|
||||
with self.assertRaises(AnsibleFailJson):
|
||||
set_module_args({})
|
||||
self.module.main()
|
||||
with set_module_args({}):
|
||||
self.module.main()
|
||||
|
||||
@patch('dnsimple.service.Identity.whoami')
|
||||
def test_account_token(self, mock_whoami):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue