def test_handle_control_path_remove(self): node = mux.MuxTreeNode() control = mux.Control(yaml_to_mux.YAML_REMOVE_NODE) to_be_removed = "node_to_be_removed" # pylint: disable=W0212 yaml_to_mux._handle_control_tag("fake_path", node, (control, to_be_removed)) self.assertEqual(control.value, to_be_removed) self.assertIn(control, node.ctrl)
def test_handle_control_path_include_file_does_not_exist(self): with self.assertRaises(ValueError): # pylint: disable=W0212 yaml_to_mux._handle_control_tag( "original_fake_file.yaml", mux.MuxTreeNode(), (mux.Control(yaml_to_mux.YAML_INCLUDE), "unexisting_include.yaml"), )