Show More
@@ -79,7 +79,8 b' class TestAdminController(TestController' | |||
|
79 | 79 | def test_filter_all_entries(self): |
|
80 | 80 | self.log_user() |
|
81 | 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 | 85 | def test_filter_journal_filter_exact_match_on_repository(self): |
|
85 | 86 | self.log_user() |
@@ -139,7 +140,8 b' class TestAdminController(TestController' | |||
|
139 | 140 | self.log_user() |
|
140 | 141 | response = self.app.get(url(controller='admin/admin', action='index', |
|
141 | 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 | 146 | def test_filter_journal_filter_prefix_on_username(self): |
|
145 | 147 | self.log_user() |
@@ -797,13 +797,14 b' class TestVcsSettings(object):' | |||
|
797 | 797 | self, backend, user_util, settings_util, csrf_token): |
|
798 | 798 | repo = backend.create_repo() |
|
799 | 799 | repo_name = repo.repo_name |
|
800 | user = UserModel().get_by_username(TEST_USER_REGULAR_LOGIN) | |
|
801 | 800 | |
|
802 | 801 | logout_user_session(self.app, csrf_token) |
|
803 | 802 | session = login_user_session( |
|
804 | 803 | self.app, TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS) |
|
805 | 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 | 808 | user_util.grant_user_permission_to_repo(repo, user, 'repository.admin') |
|
808 | 809 | data = self.FORM_DATA.copy() |
|
809 | 810 | data['csrf_token'] = new_csrf_token |
@@ -1179,11 +1180,14 b' class TestVcsSettings(object):' | |||
|
1179 | 1180 | self, backend_svn, user_util, settings_util, csrf_token): |
|
1180 | 1181 | repo = backend_svn.create_repo() |
|
1181 | 1182 | repo_name = repo.repo_name |
|
1182 | user = UserModel().get_by_username(TEST_USER_REGULAR_LOGIN) | |
|
1183 | ||
|
1183 | 1184 | logout_user_session(self.app, csrf_token) |
|
1184 | 1185 | session = login_user_session( |
|
1185 | 1186 | self.app, TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS) |
|
1186 | 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 | 1191 | user_util.grant_user_permission_to_repo(repo, user, 'repository.admin') |
|
1188 | 1192 | branch = settings_util.create_repo_rhodecode_ui( |
|
1189 | 1193 | repo, VcsSettingsModel.SVN_BRANCH_SECTION, 'test_branch', |
General Comments 0
You need to be logged in to leave comments.
Login now