tests: Fix test that modifies test repo settings.

This test now creates it's own repo to modify the repo vcs settings.
Instead of modifying the settings of the vcs_test_repo which is used
in other tests again.
This commit is contained in:
Martin Bornhold 2016-07-08 08:34:12 +02:00
parent 51e1968537
commit d7bec50fc7

View file

@ -87,13 +87,16 @@ class TestAdminRepoSettingsController:
if backend.alias not in setting_backends:
pytest.skip('Setting not available for backend {}'.format(backend))
settings_model = SettingsModel(repo=backend.repo)
repo = backend.create_repo()
settings_model = SettingsModel(repo=repo)
vcs_settings_url = url(
'repo_vcs_settings', repo_name=backend.repo.repo_name)
'repo_vcs_settings', repo_name=repo.repo_name)
self.app.post(
vcs_settings_url,
params={
'inherit_global_settings': False,
'new_svn_branch': 'dummy-value-for-testing',
'new_svn_tag': 'dummy-value-for-testing',
'rhodecode_{}'.format(setting_name): 'true',
@ -105,6 +108,7 @@ class TestAdminRepoSettingsController:
self.app.post(
vcs_settings_url,
params={
'inherit_global_settings': False,
'new_svn_branch': 'dummy-value-for-testing',
'new_svn_tag': 'dummy-value-for-testing',
'rhodecode_{}'.format(setting_name): 'false',