def default_validation_test(self): conf = AnacondaConfiguration.from_defaults() conf.validate() # Set invalid value. parser = conf.get_parser() parser["Anaconda"]["debug"] = "string" with self.assertRaises(ConfigurationError): conf.validate() # Remove a required option. parser.remove_option("Anaconda", "debug") with self.assertRaises(ConfigurationError): conf.validate() # Remove a required section. parser.remove_section("Anaconda") with self.assertRaises(ConfigurationError): conf.validate()
def default_validation_test(self): conf = AnacondaConfiguration.from_defaults() conf.validate() # Set invalid value. parser = conf.get_parser() parser["Anaconda"]["debug"] = "string" with self.assertRaises(ConfigurationError): conf.validate() # Remove a required option. parser.remove_option("Anaconda", "debug") with self.assertRaises(ConfigurationError): conf.validate() # Remove a required section. parser.remove_section("Anaconda") with self.assertRaises(ConfigurationError): conf.validate()