mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 03:30:22 -07:00
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.
This commit is contained in:
parent
402f725424
commit
a1781d09dd
84 changed files with 4043 additions and 4302 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