tests: fixed home tests with cached values
This commit is contained in:
parent
7902155b2e
commit
ad176ab69b
1 changed files with 5 additions and 3 deletions
|
|
@ -110,10 +110,12 @@ class TestHomeController(TestController):
|
|||
def test_index_show_version(self, autologin_user, name, state):
|
||||
version_string = 'RhodeCode Enterprise %s' % rhodecode.__version__
|
||||
|
||||
show = SettingsModel().get_setting_by_name('show_version')
|
||||
show.app_settings_value = state
|
||||
Session().add(show)
|
||||
sett = SettingsModel().create_or_update_setting(
|
||||
'show_version', state, 'bool')
|
||||
Session().add(sett)
|
||||
Session().commit()
|
||||
SettingsModel().invalidate_settings_cache()
|
||||
|
||||
response = self.app.get(url(controller='home', action='index'))
|
||||
if state is True:
|
||||
response.mustcontain(version_string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue