diff --git a/checkbox-ng/plainbox/impl/unit/test_unit.py b/checkbox-ng/plainbox/impl/unit/test_unit.py index 3a274ae3b4..32b088a4a5 100644 --- a/checkbox-ng/plainbox/impl/unit/test_unit.py +++ b/checkbox-ng/plainbox/impl/unit/test_unit.py @@ -203,12 +203,14 @@ def test_get_record_value(self): self.assertEqual(unit1.get_record_value("key"), "value") self.assertEqual(unit2.get_record_value("key"), "value") self.assertEqual(unit3.get_record_value("key"), "value") - with self.assertRaises(MissingParam): + with self.assertRaises(MissingParam) as mp: # TODO: this is structured badly, if a unit has a template-engine # it is a tempalte, but the definition is in Unit, not # TemplateUnit. Once you fix it, remove the following line unit4.template_id = "template_id" unit4.get_record_value("key") + self.assertIn("template_id", str(mp.exception)) + self.assertIn("missing_param", repr(mp.exception)) self.assertEqual(unit5.get_record_value("key"), None) self.assertEqual(unit5.get_record_value("key", "default"), "default") self.assertEqual(unit6.get_record_value("key"), None)