def test_save_overwrite(self, config_file_path): config = FileConfig(config_file_path=config_file_path) assert_that(config_file_path, is_not(equal_to('newtoken'))) config.auth_token = 'newtoken' config.save() config_reloaded = FileConfig(config_file_path=config_file_path) assert_that(config_reloaded.auth_token, equal_to('newtoken'))
def test_save(self, config_file_path): assert_that(path.isfile(config_file_path), is_(False)) config = FileConfig(config_file_path=config_file_path) config.auth_token = 'brandnewtoken' config.save() config_reload = FileConfig(config_file_path=config_file_path) assert_that(path.isfile(config_file_path), is_(True)) assert_that(config_reload.auth_token, equal_to(config.auth_token))