def test_list_sections(self): config = Config() config.add_section("test2") config.add_section("test1") expected = [ ('test1', config.test1), ('test2', config.test2) ] self.assertEqual(config.list_sections(), expected)