def test_history_crop(self): file = NamedTemporaryFile().name config = Config(file) for i in range(10): config.add_winner('Sisaket') config.save() config = Config(file) config.load() self.assertEqual(7, len(config._history))
def test_save_load(self): file = NamedTemporaryFile().name config = Config(file) config.add_place('Sisaket') config.save() places = config.places config = Config(file) config.load() self.assertEqual(places, config.places)