def testMissingRequiredAttribute(self):
     with self.assertRaises(Exception) as context:
         histogram_configuration_model.PrettifyTree(
             etree_util.ParseXMLString(XML_MISSING_SEPARATOR))
     self.assertIn('separator', str(context.exception))
     self.assertIn('Missing attribute', str(context.exception))
 def testPrettify(self, _, input_xml, expected_xml):
     result = histogram_configuration_model.PrettifyTree(
         etree_util.ParseXMLString(input_xml))
     self.assertMultiLineEqual(result.strip(), expected_xml)