def test_copy_sections_found(self): """Test copy_sections function for sections found in config text.""" config_text = guf.copy_sections() self.assertIsNotNone(config_text) for section in ( 'LOGFILE SETTINGS', 'EXTERNAL SCRIPT PATH SETTINGS', 'FURTHER SETTINGS', 'HTTP SETTINGS', 'REPLICATION BOT SETTINGS', ): self.assertIn(section, config_text) lines = config_text.splitlines() self.assertGreater(len(lines), 200)
def test_copy_sections_not_found(self): """Test copy_sections function for sections not in config text.""" config_text = guf.copy_sections() for section in guf.DISABLED_SECTIONS | guf.OBSOLETE_SECTIONS: self.assertNotIn(section, config_text)