Added EfficacyIndicator model in DB

In this changeset, I created a new model named EfficacyIndicator
which is responsible for storing information regarding the efficacy
indicators that were computed by the strategy in its solution. Every
efficacy indicator should relate to a single Action Plan.

Partially Implements: blueprint efficacy-indicator

Change-Id: Ifc14ea5e16e92f032d7912c9b3fdc270af79cab6
This commit is contained in:
Vincent Françoise
2016-05-17 16:47:12 +02:00
parent 2544327979
commit eab47bf182
8 changed files with 669 additions and 21 deletions

View File

@@ -273,7 +273,12 @@ class DbGoalTestCase(base.DbTestCase):
self.assertEqual([goal2['uuid']], [r.uuid for r in res])
def test_get_goal_by_uuid(self):
created_goal = self._create_test_goal()
efficacy_spec = [{"unit": "%", "name": "dummy",
"schema": "Range(min=0, max=100, min_included=True, "
"max_included=True, msg=None)",
"description": "Dummy indicator"}]
created_goal = self._create_test_goal(
efficacy_specification=efficacy_spec)
goal = self.dbapi.get_goal_by_uuid(self.context, created_goal['uuid'])
self.assertEqual(goal.uuid, created_goal['uuid'])