예제 #1
0
 def get_dns_mock_object(self, type='zapi', kind=None, status=None):
     dns_obj = dns_module()
     if type == 'zapi':
         if kind is None:
             dns_obj.server = MockONTAPConnection()
         else:
             dns_obj.server = MockONTAPConnection(kind=kind, data=status)
     return dns_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({})
         dns_module()
     print('Info: %s' % exc.value.args[0]['msg'])