def test_get_one_ok(self): action_plan = obj_utils.create_test_action_plan(self.context) obj_utils.create_test_efficacy_indicator( self.context, action_plan_id=action_plan['id']) response = self.get_json('/action_plans/%s' % action_plan['uuid']) self.assertEqual(action_plan.uuid, response['uuid']) self._assert_action_plans_fields(response) self.assertEqual([{ 'description': 'Test indicator', 'name': 'test_indicator', 'value': 0.0, 'unit': '%' }], response['efficacy_indicators'])
def test_get_one_ok(self): action_plan = obj_utils.create_test_action_plan(self.context) obj_utils.create_test_efficacy_indicator( self.context, action_plan_id=action_plan['id']) response = self.get_json('/action_plans/%s' % action_plan['uuid']) self.assertEqual(action_plan.uuid, response['uuid']) self._assert_action_plans_fields(response) self.assertEqual( [{'description': 'Test indicator', 'name': 'test_indicator', 'value': 0.0, 'unit': '%'}], response['efficacy_indicators'])