Show More
@@ -22,6 +22,7 b' import mock' | |||
|
22 | 22 | import pytest |
|
23 | 23 | |
|
24 | 24 | import rhodecode |
|
25 | from rhodecode.model.db import Repository | |
|
25 | 26 | from rhodecode.model.settings import SettingsModel |
|
26 | 27 | from rhodecode.tests import url |
|
27 | 28 | from rhodecode.tests.utils import AssertResponse |
@@ -87,10 +88,11 b' class TestAdminRepoVcsSettings(object):' | |||
|
87 | 88 | pytest.skip('Setting not available for backend {}'.format(backend)) |
|
88 | 89 | |
|
89 | 90 | repo = backend.create_repo() |
|
91 | repo_name = repo.repo_name | |
|
90 | 92 | |
|
91 | 93 | settings_model = SettingsModel(repo=repo) |
|
92 | 94 | vcs_settings_url = url( |
|
93 |
'repo_vcs_settings', repo_name= |
|
|
95 | 'repo_vcs_settings', repo_name=repo_name) | |
|
94 | 96 | |
|
95 | 97 | self.app.post( |
|
96 | 98 | vcs_settings_url, |
@@ -101,6 +103,7 b' class TestAdminRepoVcsSettings(object):' | |||
|
101 | 103 | 'rhodecode_{}'.format(setting_name): 'true', |
|
102 | 104 | 'csrf_token': csrf_token, |
|
103 | 105 | }) |
|
106 | settings_model = SettingsModel(repo=Repository.get_by_repo_name(repo_name)) | |
|
104 | 107 | setting = settings_model.get_setting_by_name(setting_name) |
|
105 | 108 | assert setting.app_settings_value |
|
106 | 109 | |
@@ -113,5 +116,6 b' class TestAdminRepoVcsSettings(object):' | |||
|
113 | 116 | 'rhodecode_{}'.format(setting_name): 'false', |
|
114 | 117 | 'csrf_token': csrf_token, |
|
115 | 118 | }) |
|
119 | settings_model = SettingsModel(repo=Repository.get_by_repo_name(repo_name)) | |
|
116 | 120 | setting = settings_model.get_setting_by_name(setting_name) |
|
117 | 121 | assert not setting.app_settings_value |
@@ -21,6 +21,7 b'' | |||
|
21 | 21 | import pytest |
|
22 | 22 | |
|
23 | 23 | from rhodecode.lib.utils2 import md5 |
|
24 | from rhodecode.model.db import Repository | |
|
24 | 25 | from rhodecode.model.meta import Session |
|
25 | 26 | from rhodecode.model.settings import SettingsModel, IssueTrackerSettingsModel |
|
26 | 27 | from rhodecode.tests import url |
@@ -100,6 +101,7 b' class TestAdminRepos:' | |||
|
100 | 101 | def test_delete_issuetracker_pattern( |
|
101 | 102 | self, autologin_user, backend, csrf_token, settings_util): |
|
102 | 103 | repo = backend.create_repo() |
|
104 | repo_name = repo.repo_name | |
|
103 | 105 | entry_key = 'issuetracker_pat_' |
|
104 | 106 | pattern = 'issuetracker_pat3' |
|
105 | 107 | uid = md5(pattern) |
@@ -115,5 +117,6 b' class TestAdminRepos:' | |||
|
115 | 117 | 'uid': uid, |
|
116 | 118 | 'csrf_token': csrf_token |
|
117 | 119 | }, status=302) |
|
118 |
settings = IssueTrackerSettingsModel( |
|
|
120 | settings = IssueTrackerSettingsModel( | |
|
121 | repo=Repository.get_by_repo_name(repo_name)).get_repo_settings() | |
|
119 | 122 | assert 'rhodecode_%s%s' % (entry_key, uid) not in settings |
General Comments 0
You need to be logged in to leave comments.
Login now