Esempio n. 1
0
 def get_login_mock_object(self, cx_type='zapi', kind=None, status=None):
     banner_obj = messages_module()
     netapp_utils.ems_log_event = Mock(return_value=None)
     if cx_type == 'zapi':
         if kind is None:
             banner_obj.server = MockONTAPConnection()
         else:
             banner_obj.server = MockONTAPConnection(kind=kind, data=status)
     return banner_obj
Esempio 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({})
         messages_module()
     print('Info: %s' % exc.value.args[0]['msg'])