POC of config/validation errors with context. Implemented by YAML for all it's cases

This commit is contained in:
Ross McFarland
2023-07-28 17:14:01 -07:00
parent 7b2a1d4429
commit 1776d558b5
5 changed files with 97 additions and 37 deletions
+3 -3
View File
@@ -104,13 +104,13 @@ class TestManager(TestCase):
with self.assertRaises(ManagerException) as ctx:
name = 'bad-plan-output-missing-class.yaml'
Manager(get_config_filename(name)).sync()
self.assertEqual('plan_output bad is missing class', str(ctx.exception))
self.assertTrue('plan_output bad is missing class' in str(ctx.exception))
def test_bad_plan_output_config(self):
with self.assertRaises(ManagerException) as ctx:
Manager(get_config_filename('bad-plan-output-config.yaml')).sync()
self.assertEqual(
'Incorrect plan_output config for bad', str(ctx.exception)
self.assertTrue(
'Incorrect plan_output config for bad' in str(ctx.exception)
)
def test_source_only_as_a_target(self):