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

Method test_goals_percent

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

Source from the content-addressed store, hash-verified

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)
44 test_goal2 = Goal(target='target2', value='value2', count=1)
45 test_fact = Fact(trait='target', value='value')
46 multi = Objective(id='123', name='test', goals=[test_goal1, test_goal2])
47 assert multi.completed([test_fact]) is False
48 assert multi.percentage == 50

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