Пример #1
0
 def get_scanner_mock_object(self, kind=None):
     scanner_obj = scanner_module()
     scanner_obj.asup_log_for_cserver = Mock(return_value=None)
     if kind is None:
         scanner_obj.server = MockONTAPConnection()
     else:
         scanner_obj.server = MockONTAPConnection(kind='scanner', data=self.mock_scanner)
     return scanner_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({})
         scanner_module()
     print('Info: %s' % exc.value.args[0]['msg'])