def test_save_with_no_pathname(self): """Tests saving config file without an explicit pathname.""" config = Config(testing.configuration_file()) config.excludes = [] config.save() config = Config(testing.configuration_file()) self.assertEquals(config.excludes, [])
def test_save(self): """Tests saving a config file.""" pathname = os.path.join(os.getenv('HOME'), 'saved.json') config = Config(testing.configuration_file()) config.excludes = [] config.override = True config.save(pathname) config = Config(pathname) self.assertEquals(config.excludes, []) self.assertEquals(config.override, True)