def test_sitemap_generator_errors(self): """CSV generation from sitemap.xml errors""" with self.assertRaises(IOError): sitemap_to_csv('/bad/path/to/input', self.sitemap_csv) with self.assertRaises(IOError): sitemap_to_csv(self.sitemap_xml, '/bad/pat/to/output')
def test_sitemap_generator_success(self): """CSV generation from sitemap.xml""" sitemap_to_csv(self.sitemap_xml, self.sitemap_csv) self.assertTrue(os.path.isfile(self.sitemap_csv))