Allow AnsibleModules to be instantiated more than once in a module

Fix SELINUX monkeypatch in test_basic
This commit is contained in:
Toshio Kuratomi 2016-04-19 20:08:01 -07:00
parent 0f373c1767
commit 44e21f7062
6 changed files with 66 additions and 17 deletions

View file

@ -67,6 +67,7 @@ class TestAnsibleModuleRunCommand(unittest.TestCase):
self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
self.stdin_swap.__enter__()
reload(basic)
self.module = AnsibleModule(argument_spec=dict())
self.module.fail_json = MagicMock(side_effect=SystemExit)