MCPcopy Index your code
hub / github.com/apache/caldera / test_find_objects

Function test_find_objects

tests/api/v2/managers/test_base_api_manager.py:60–70  ·  view source on GitHub ↗
(agent)

Source from the content-addressed store, hash-verified

58
59
60def test_find_objects(agent):
61 stub_data_svc = StubDataService()
62 stub_data_svc.ram['agents'] = [
63 agent(paw='agent0', sleep_min=2, sleep_max=5, watchdog=0),
64 agent(paw='agent1', sleep_min=2, sleep_max=5, watchdog=0)
65 ]
66 manager = BaseApiManager(data_svc=stub_data_svc, file_svc=None)
67
68 agents = list(manager.find_objects('agents'))
69
70 assert len(agents) == len(stub_data_svc.ram['agents'])
71
72
73def test_find_objects_with_search(agent):

Callers

nothing calls this directly

Calls 4

find_objectsMethod · 0.95
BaseApiManagerClass · 0.90
agentFunction · 0.85
StubDataServiceClass · 0.70

Tested by

no test coverage detected