Show More
@@ -41,7 +41,7 b' class TestCreateRepo(object):' | |||
|
41 | 41 | @pytest.mark.parametrize('given, expected_name, expected_exc', [ |
|
42 | 42 | ('api repo-1', 'api-repo-1', False), |
|
43 | 43 | ('api-repo 1-ąć', 'api-repo-1-ąć', False), |
|
44 |
( |
|
|
44 | ('unicode-ąć', u'unicode-ąć', False), | |
|
45 | 45 | ('some repo v1.2', 'some-repo-v1.2', False), |
|
46 | 46 | ('v2.0', 'v2.0', False), |
|
47 | 47 | ]) |
@@ -211,8 +211,8 b' class TestCreateRepoGroup(object):' | |||
|
211 | 211 | |
|
212 | 212 | expected = { |
|
213 | 213 | 'repo_group': |
|
214 |
|
|
|
215 |
|
|
|
214 | 'You do not have the permission to store ' | |
|
215 | 'repository groups in the root location.'} | |
|
216 | 216 | assert_error(id_, expected, given=response.body) |
|
217 | 217 | |
|
218 | 218 | def test_api_create_repo_group_regular_user_no_parent_group_perms(self): |
@@ -232,8 +232,8 b' class TestCreateRepoGroup(object):' | |||
|
232 | 232 | |
|
233 | 233 | expected = { |
|
234 | 234 | 'repo_group': |
|
235 |
|
|
|
236 |
|
|
|
235 | "You do not have the permissions to store " | |
|
236 | "repository groups inside repository group `{}`".format(repo_group_name)} | |
|
237 | 237 | try: |
|
238 | 238 | assert_error(id_, expected, given=response.body) |
|
239 | 239 | finally: |
@@ -76,8 +76,8 b' class TestApiGetGist(object):' | |||
|
76 | 76 | 'url': 'http://%s/_admin/gists/%s' % (http_host_only_stub, gist_id,), |
|
77 | 77 | 'acl_level': Gist.ACL_LEVEL_PUBLIC, |
|
78 | 78 | 'content': { |
|
79 |
|
|
|
80 |
|
|
|
79 | 'filename1.txt': 'hello world', | |
|
80 | 'filename1ą.txt': 'hello worldę' | |
|
81 | 81 | }, |
|
82 | 82 | } |
|
83 | 83 |
@@ -446,8 +446,8 b' class TestAdminRepos(object):' | |||
|
446 | 446 | csrf_token=csrf_token)) |
|
447 | 447 | |
|
448 | 448 | response.mustcontain( |
|
449 |
|
|
|
450 |
|
|
|
449 | "You do not have the permission to store repositories in " | |
|
450 | "the root location.") | |
|
451 | 451 | |
|
452 | 452 | @mock.patch.object(RepoModel, '_create_filesystem_repo', error_function) |
|
453 | 453 | def test_create_repo_when_filesystem_op_fails( |
@@ -266,7 +266,7 b' class TestLoginController(object):' | |||
|
266 | 266 | ) |
|
267 | 267 | |
|
268 | 268 | assertr = response.assert_response() |
|
269 |
msg = |
|
|
269 | msg = 'This e-mail address is already taken' | |
|
270 | 270 | assertr.element_contains('#email+.error-message', msg) |
|
271 | 271 | |
|
272 | 272 | def test_register_err_same_email_case_sensitive(self): |
@@ -282,7 +282,7 b' class TestLoginController(object):' | |||
|
282 | 282 | } |
|
283 | 283 | ) |
|
284 | 284 | assertr = response.assert_response() |
|
285 |
msg = |
|
|
285 | msg = 'This e-mail address is already taken' | |
|
286 | 286 | assertr.element_contains('#email+.error-message', msg) |
|
287 | 287 | |
|
288 | 288 | def test_register_err_wrong_data(self): |
@@ -44,7 +44,7 b' class RhodeCodeAuthPlugin(RhodeCodeExter' | |||
|
44 | 44 | |
|
45 | 45 | @hybrid_property |
|
46 | 46 | def name(self): |
|
47 |
return |
|
|
47 | return "external_test" | |
|
48 | 48 | |
|
49 | 49 | def settings(self): |
|
50 | 50 | settings = [ |
@@ -29,7 +29,7 b' from rhodecode.model import db' | |||
|
29 | 29 | class RcTestAuthPlugin(RhodeCodeAuthPluginBase): |
|
30 | 30 | |
|
31 | 31 | def name(self): |
|
32 |
return |
|
|
32 | return 'stub_auth' | |
|
33 | 33 | |
|
34 | 34 | |
|
35 | 35 | def test_authenticate_returns_from_auth(stub_auth_data): |
@@ -969,7 +969,7 b' class TestGitCommit(object):' | |||
|
969 | 969 | branches = self.repo.branches |
|
970 | 970 | |
|
971 | 971 | assert 'unicode' in branches |
|
972 |
assert |
|
|
972 | assert 'uniçö∂e' in branches | |
|
973 | 973 | |
|
974 | 974 | def test_unicode_tag_refs(self): |
|
975 | 975 | unicode_tags = { |
@@ -983,7 +983,7 b' class TestGitCommit(object):' | |||
|
983 | 983 | tags = self.repo.tags |
|
984 | 984 | |
|
985 | 985 | assert 'unicode' in tags |
|
986 |
assert |
|
|
986 | assert 'uniçö∂e' in tags | |
|
987 | 987 | |
|
988 | 988 | def test_commit_message_is_unicode(self): |
|
989 | 989 | for commit in self.repo: |
@@ -145,14 +145,14 b' def test_unicode_refs(vcsbackend, filena' | |||
|
145 | 145 | with mock.patch(("rhodecode.lib.vcs.backends.svn.repository" |
|
146 | 146 | ".SubversionRepository._patterns_from_section"), |
|
147 | 147 | return_value=['branches/*']): |
|
148 |
assert |
|
|
148 | assert f'branches/{branch}' in repo.branches | |
|
149 | 149 | |
|
150 | 150 | |
|
151 | 151 | def test_compatible_version(monkeypatch, vcsbackend): |
|
152 | 152 | monkeypatch.setattr(settings, 'SVN_COMPATIBLE_VERSION', 'pre-1.8-compatible') |
|
153 | 153 | path = vcsbackend.new_repo_path() |
|
154 | 154 | SubversionRepository(path, create=True) |
|
155 |
with open('{}/db/format' |
|
|
155 | with open(f'{path}/db/format') as f: | |
|
156 | 156 | first_line = f.readline().strip() |
|
157 | 157 | assert first_line == '4' |
|
158 | 158 |
General Comments 0
You need to be logged in to leave comments.
Login now