Ejemplo n.º 1
0
def test_get_agent_items_private(mock_plain_dict, mock_fields_nest, mock_sort, mock_agent_overview, sort, limit, response):
    """
        Tests _get_agent_items private method
    """
    with patch ("wazuh.syscollector.get_item_agent", return_value=response):
        results = syscollector._get_agent_items(func=syscollector.get_packages_agent, offset=0, limit=limit, select={},
                                      filters={}, search={}, sort=sort)

        assert isinstance(results, dict)
Ejemplo n.º 2
0
def get_ciscat_results(offset=0,
                       limit=common.database_limit,
                       select=None,
                       filters={},
                       search={},
                       sort={}):
    return _get_agent_items(func=get_results_agent,
                            offset=offset,
                            limit=limit,
                            select=select,
                            filters=filters,
                            search=search,
                            sort=sort,
                            array=True)