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

Function test_dump_with_include

tests/api/v2/managers/test_base_api_manager.py:139–151  ·  view source on GitHub ↗
(data_svc, agent)

Source from the content-addressed store, hash-verified

137
138
139def test_dump_with_include(data_svc, agent):
140 include_key = 'paw'
141
142 test_agent = agent(sleep_min=2, sleep_max=5, watchdog=0)
143 dumped_agent = test_agent.schema.dump(test_agent)
144
145 manager = BaseApiManager(data_svc=data_svc, file_svc=None)
146 manager_dumped_agent = manager.dump_object_with_filters(test_agent, include=[include_key])
147
148 assert include_key in dumped_agent
149 assert include_key in manager_dumped_agent
150 assert len(manager_dumped_agent.keys()) == 1
151 assert manager_dumped_agent[include_key] == dumped_agent[include_key]
152
153
154def test_find_and_dump_objects_with_sort(agent):

Callers

nothing calls this directly

Calls 3

BaseApiManagerClass · 0.90
agentFunction · 0.85

Tested by

no test coverage detected