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

Method test_goals_satisfied

tests/objects/test_objective.py:33–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 assert test_goal4.satisfied(all_facts=[test_facta, test_factb, test_factc]) is True
32
33 def test_goals_satisfied(self):
34 test_goal1 = Goal(target='target', value='value', count=1)
35 test_goal2 = Goal(target='target2', value='value2', count=1)
36 test_facta = Fact(trait='target', value='value')
37 test_factb = Fact(trait='target2', value='value2')
38 multi = Objective(id='123', name='test', goals=[test_goal1, test_goal2])
39 assert multi.completed([test_facta]) is False
40 assert multi.completed([test_facta, test_factb]) is True
41
42 def test_goals_percent(self):
43 test_goal1 = Goal(target='target', value='value', count=1)

Callers

nothing calls this directly

Calls 4

completedMethod · 0.95
GoalClass · 0.90
FactClass · 0.90
ObjectiveClass · 0.90

Tested by

no test coverage detected