示例#1
0
 def get_autosize_mock_object(self, type='zapi', kind=None):
     autosize_obj = autosize_module()
     if type == 'zapi':
         if kind is None:
             autosize_obj.server = MockONTAPConnection()
         elif kind == 'autosize':
             autosize_obj.server = MockONTAPConnection(kind='autosize', data=self.mock_autosize)
     return autosize_obj
示例#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({})
         autosize_module()
     print('Info: %s' % exc.value.args[0]['msg'])