def get_net_route_mock_object(self, kind=None, data=None):
     """
     Helper method to return an na_ontap_net_route object
     :param kind: passes this param to MockONTAPConnection()
     :param data: passes this data to  MockONTAPConnection()
     :return: na_ontap_net_route object
     """
     net_route_obj = net_route_module()
     net_route_obj.ems_log_event = Mock(return_value=None)
     net_route_obj.cluster = Mock()
     net_route_obj.cluster.invoke_successfully = Mock()
     if kind is None:
         net_route_obj.server = MockONTAPConnection()
     else:
         if data is None:
             net_route_obj.server = MockONTAPConnection(
                 kind='net_route', data=self.mock_net_route)
         else:
             net_route_obj.server = MockONTAPConnection(kind='net_route',
                                                        data=data)
     return net_route_obj
 def test_module_fail_when_required_args_missing(self):
     ''' required arguments are reported as errors '''
     with pytest.raises(AnsibleFailJson) as exc:
         set_module_args({})
         net_route_module()
     print('Info: %s' % exc.value.args[0]['msg'])