comparison rhodecode/tests/api/api_base.py @ 3774:60335b702a00 beta

invalidation: don't create CacheInvalidation records on startup Creating the records early gave an advantage before lightweight was introduced. With lightweight it is no longer necessary. The records will be created on demand anyway and there is no reason to create and maintain them before they are used.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 03 Apr 2013 15:56:12 +0200
parents 12ca667b69b6
children e2ebd8808351
comparison
equal deleted inserted replaced
3773:8e2cd46f765b 3774:60335b702a00
262 262
263 expected = 'Error occurred during rescan repositories action' 263 expected = 'Error occurred during rescan repositories action'
264 self._compare_error(id_, expected, given=response.body) 264 self._compare_error(id_, expected, given=response.body)
265 265
266 def test_api_invalidate_cache(self): 266 def test_api_invalidate_cache(self):
267 repo = RepoModel().get_by_repo_name(self.REPO)
268 repo.scm_instance_cached() # seed cache
269
267 id_, params = _build_data(self.apikey, 'invalidate_cache', 270 id_, params = _build_data(self.apikey, 'invalidate_cache',
268 repoid=self.REPO) 271 repoid=self.REPO)
269 response = api_call(self, params) 272 response = api_call(self, params)
270 273
271 expected = ("Caches of repository `%s` was invalidated" % (self.REPO)) 274 expected = ("Caches of repository `%s` was invalidated" % (self.REPO))