2609
2609
def test_load_badly_encoded_content(self):
2610
2610
"""Ensure we display a proper error on non-ascii, non utf-8 content."""
2611
2611
with open('foo.conf', 'wb') as f:
2613
2613
conf = config.IniBasedConfig(file_name='foo.conf')
2614
2614
self.assertRaises(config.ConfigContentError, conf._get_parser)
2616
2616
def test_load_erroneous_content(self):
2617
2617
"""Ensure we display a proper error on content that can't be parsed."""
2618
2618
with open('foo.conf', 'wb') as f:
2620
2620
conf = config.IniBasedConfig(file_name='foo.conf')
2621
2621
self.assertRaises(config.ParseConfigError, conf._get_parser)