def test_module_fail_when_required_args_missing(self):
     ''' required arguments are reported as errors '''
     with pytest.raises(AnsibleFailJson) as exc:
         set_module_args({})
         rest_cli_module()
     print('Info: %s' % exc.value.args[0]['msg'])
 def get_cli_mock_object(self):
     # For rest, mocking is achieved through side_effect
     return rest_cli_module()