Ejemplo n.º 1
0
 def get_volume_mock_object(self, **kwargs):
     volume_obj = volume_module()
     netapp_utils.ems_log_event = Mock(return_value=None)
     volume_obj.server = MockONTAPConnection(**kwargs)
     volume_obj.cluster = MockONTAPConnection(kind='error',
                                              data='cluster ZAPI.')
     return volume_obj
Ejemplo n.º 2
0
 def test_module_fail_when_required_args_missing(self):
     ''' required arguments are reported as errors '''
     with pytest.raises(AnsibleFailJson) as exc:
         set_module_args({})
         volume_module()
     print('Info: %s' % exc.value.args[0]['msg'])