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

Method test_operation

tests/services/test_data_svc.py:138–147  ·  view source on GitHub ↗
(self, event_loop, data_svc)

Source from the content-addressed store, hash-verified

136 assert len(abilities) == 1
137
138 def test_operation(self, event_loop, data_svc):
139 adversary = event_loop.run_until_complete(data_svc.store(
140 Adversary(adversary_id='123', name='test', description='test adversary', atomic_ordering=list())
141 ))
142 event_loop.run_until_complete(data_svc.store(Operation(name='my first op', agents=[], adversary=adversary)))
143
144 operations = event_loop.run_until_complete(data_svc.locate('operations'))
145 assert len(operations) == 1
146 for x in operations:
147 json.dumps(x.display)
148
149 def test_remove(self, event_loop, data_svc):
150 a1 = event_loop.run_until_complete(data_svc.store(Agent(sleep_min=2, sleep_max=8, watchdog=0)))

Callers

nothing calls this directly

Calls 4

AdversaryClass · 0.90
OperationClass · 0.90
storeMethod · 0.45
locateMethod · 0.45

Tested by

no test coverage detected