Show More
@@ -79,7 +79,8 b' class TestAdminController(TestController' | |||||
79 | def test_filter_all_entries(self): |
|
79 | def test_filter_all_entries(self): | |
80 | self.log_user() |
|
80 | self.log_user() | |
81 | response = self.app.get(url(controller='admin/admin', action='index',)) |
|
81 | response = self.app.get(url(controller='admin/admin', action='index',)) | |
82 | response.mustcontain('2034 entries') |
|
82 | all_count = UserLog.query().count() | |
|
83 | response.mustcontain('%s entries' % all_count) | |||
83 |
|
84 | |||
84 | def test_filter_journal_filter_exact_match_on_repository(self): |
|
85 | def test_filter_journal_filter_exact_match_on_repository(self): | |
85 | self.log_user() |
|
86 | self.log_user() | |
@@ -139,7 +140,8 b' class TestAdminController(TestController' | |||||
139 | self.log_user() |
|
140 | self.log_user() | |
140 | response = self.app.get(url(controller='admin/admin', action='index', |
|
141 | response = self.app.get(url(controller='admin/admin', action='index', | |
141 | filter='username:*test*')) |
|
142 | filter='username:*test*')) | |
142 | response.mustcontain('100 entries') |
|
143 | entries_count = UserLog.query().filter(UserLog.username.ilike('%test%')).count() | |
|
144 | response.mustcontain('{} entries'.format(entries_count)) | |||
143 |
|
145 | |||
144 | def test_filter_journal_filter_prefix_on_username(self): |
|
146 | def test_filter_journal_filter_prefix_on_username(self): | |
145 | self.log_user() |
|
147 | self.log_user() |
@@ -797,13 +797,14 b' class TestVcsSettings(object):' | |||||
797 | self, backend, user_util, settings_util, csrf_token): |
|
797 | self, backend, user_util, settings_util, csrf_token): | |
798 | repo = backend.create_repo() |
|
798 | repo = backend.create_repo() | |
799 | repo_name = repo.repo_name |
|
799 | repo_name = repo.repo_name | |
800 | user = UserModel().get_by_username(TEST_USER_REGULAR_LOGIN) |
|
|||
801 |
|
800 | |||
802 | logout_user_session(self.app, csrf_token) |
|
801 | logout_user_session(self.app, csrf_token) | |
803 | session = login_user_session( |
|
802 | session = login_user_session( | |
804 | self.app, TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS) |
|
803 | self.app, TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS) | |
805 | new_csrf_token = auth.get_csrf_token(session) |
|
804 | new_csrf_token = auth.get_csrf_token(session) | |
806 |
|
805 | |||
|
806 | user = UserModel().get_by_username(TEST_USER_REGULAR_LOGIN) | |||
|
807 | repo = Repository.get_by_repo_name(repo_name) | |||
807 | user_util.grant_user_permission_to_repo(repo, user, 'repository.admin') |
|
808 | user_util.grant_user_permission_to_repo(repo, user, 'repository.admin') | |
808 | data = self.FORM_DATA.copy() |
|
809 | data = self.FORM_DATA.copy() | |
809 | data['csrf_token'] = new_csrf_token |
|
810 | data['csrf_token'] = new_csrf_token | |
@@ -1179,11 +1180,14 b' class TestVcsSettings(object):' | |||||
1179 | self, backend_svn, user_util, settings_util, csrf_token): |
|
1180 | self, backend_svn, user_util, settings_util, csrf_token): | |
1180 | repo = backend_svn.create_repo() |
|
1181 | repo = backend_svn.create_repo() | |
1181 | repo_name = repo.repo_name |
|
1182 | repo_name = repo.repo_name | |
1182 | user = UserModel().get_by_username(TEST_USER_REGULAR_LOGIN) |
|
1183 | ||
1183 | logout_user_session(self.app, csrf_token) |
|
1184 | logout_user_session(self.app, csrf_token) | |
1184 | session = login_user_session( |
|
1185 | session = login_user_session( | |
1185 | self.app, TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS) |
|
1186 | self.app, TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS) | |
1186 | csrf_token = auth.get_csrf_token(session) |
|
1187 | csrf_token = auth.get_csrf_token(session) | |
|
1188 | ||||
|
1189 | repo = Repository.get_by_repo_name(repo_name) | |||
|
1190 | user = UserModel().get_by_username(TEST_USER_REGULAR_LOGIN) | |||
1187 | user_util.grant_user_permission_to_repo(repo, user, 'repository.admin') |
|
1191 | user_util.grant_user_permission_to_repo(repo, user, 'repository.admin') | |
1188 | branch = settings_util.create_repo_rhodecode_ui( |
|
1192 | branch = settings_util.create_repo_rhodecode_ui( | |
1189 | repo, VcsSettingsModel.SVN_BRANCH_SECTION, 'test_branch', |
|
1193 | repo, VcsSettingsModel.SVN_BRANCH_SECTION, 'test_branch', |
General Comments 0
You need to be logged in to leave comments.
Login now