MCPcopy
hub / github.com/apache/caldera / test_replace_object

Function test_replace_object

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

Source from the content-addressed store, hash-verified

238
239
240def test_replace_object(agent):
241 stub_data_svc = StubDataService()
242 test_obj = TestObject(name='name0', value='value0')
243 stub_data_svc.ram['tests'] = [test_obj]
244 manager = BaseApiManager(data_svc=stub_data_svc, file_svc=None)
245
246 data = {'name': 'name0'}
247 manager.replace_object(test_obj, data)
248
249 assert len(stub_data_svc.ram['tests']) == 1
250 assert not stub_data_svc.ram['tests'][0].value

Callers

nothing calls this directly

Calls 4

replace_objectMethod · 0.95
BaseApiManagerClass · 0.90
TestObjectClass · 0.85
StubDataServiceClass · 0.70

Tested by

no test coverage detected