diff --git a/kallithea/tests/functional/test_changeset_comments.py b/kallithea/tests/functional/test_changeset_comments.py --- a/kallithea/tests/functional/test_changeset_comments.py +++ b/kallithea/tests/functional/test_changeset_comments.py @@ -54,8 +54,8 @@ class TestChangeSetCommentsController(Te ID = ChangesetComment.query().first().comment_id self.assertEqual(notification.type_, Notification.TYPE_CHANGESET_COMMENT) - sbj = (u'/vcs_test_hg/changeset/' - '27cd5cce30c96924232dffcd24178a07ffeb5dfc#comment-%s' % ID) + sbj = (u'/%s/changeset/' + '27cd5cce30c96924232dffcd24178a07ffeb5dfc#comment-%s' % (HG_REPO, ID)) print "%s vs %s" % (sbj, notification.subject) self.assertTrue(sbj in notification.subject) @@ -95,8 +95,8 @@ class TestChangeSetCommentsController(Te ID = ChangesetComment.query().first().comment_id self.assertEqual(notification.type_, Notification.TYPE_CHANGESET_COMMENT) - sbj = (u'/vcs_test_hg/changeset/' - '27cd5cce30c96924232dffcd24178a07ffeb5dfc#comment-%s' % ID) + sbj = (u'/%s/changeset/' + '27cd5cce30c96924232dffcd24178a07ffeb5dfc#comment-%s' % (HG_REPO, ID)) print "%s vs %s" % (sbj, notification.subject) self.assertTrue(sbj in notification.subject) diff --git a/kallithea/tests/functional/test_files.py b/kallithea/tests/functional/test_files.py --- a/kallithea/tests/functional/test_files.py +++ b/kallithea/tests/functional/test_files.py @@ -33,19 +33,19 @@ class TestFilesController(TestController revision='tip', f_path='/')) # Test response... - response.mustcontain('docs') - response.mustcontain('vcs') - response.mustcontain('.gitignore') - response.mustcontain('.hgignore') - response.mustcontain('.hgtags') - response.mustcontain('.travis.yml') - response.mustcontain('MANIFEST.in') - response.mustcontain('README.rst') - response.mustcontain('run_test_and_report.sh') - response.mustcontain('setup.cfg') - response.mustcontain('setup.py') - response.mustcontain('test_and_report.sh') - response.mustcontain('tox.ini') + response.mustcontain('docs' % HG_REPO) + response.mustcontain('vcs' % HG_REPO) + response.mustcontain('.gitignore' % HG_REPO) + response.mustcontain('.hgignore' % HG_REPO) + response.mustcontain('.hgtags' % HG_REPO) + response.mustcontain('.travis.yml' % HG_REPO) + response.mustcontain('MANIFEST.in' % HG_REPO) + response.mustcontain('README.rst' % HG_REPO) + response.mustcontain('run_test_and_report.sh' % HG_REPO) + response.mustcontain('setup.cfg' % HG_REPO) + response.mustcontain('setup.py' % HG_REPO) + response.mustcontain('test_and_report.sh' % HG_REPO) + response.mustcontain('tox.ini' % HG_REPO) def test_index_revision(self): self.log_user() @@ -59,9 +59,9 @@ class TestFilesController(TestController #Test response... - response.mustcontain('docs') - response.mustcontain('tests') - response.mustcontain('README.rst') + response.mustcontain('docs' % HG_REPO) + response.mustcontain('tests' % HG_REPO) + response.mustcontain('README.rst' % HG_REPO) response.mustcontain('1.1 KiB') def test_index_different_branch(self): diff --git a/kallithea/tests/models/test_permissions.py b/kallithea/tests/models/test_permissions.py --- a/kallithea/tests/models/test_permissions.py +++ b/kallithea/tests/models/test_permissions.py @@ -70,7 +70,7 @@ class TestPermissions(BaseTestCase): 'repositories_groups': {}, 'global': set([u'hg.create.repository', u'repository.read', u'hg.register.manual_activate']), - 'repositories': {u'vcs_test_hg': u'repository.read'} + 'repositories': {HG_REPO: u'repository.read'} } self.assertEqual(u1_auth.permissions['repositories'][HG_REPO], perms['repositories'][HG_REPO]) @@ -88,7 +88,7 @@ class TestPermissions(BaseTestCase): perms = { 'repositories_groups': {}, 'global': set([u'hg.admin', 'hg.create.write_on_repogroup.true']), - 'repositories': {u'vcs_test_hg': u'repository.admin'} + 'repositories': {HG_REPO: u'repository.admin'} } self.assertEqual(a1_auth.permissions['repositories'][HG_REPO], perms['repositories'][HG_REPO]) @@ -109,7 +109,7 @@ class TestPermissions(BaseTestCase): perms = { 'repositories_groups': {u'test1': 'group.read', u'test2': 'group.read'}, 'global': set(Permission.DEFAULT_USER_PERMISSIONS), - 'repositories': {u'vcs_test_hg': u'repository.read'} + 'repositories': {HG_REPO: u'repository.read'} } self.assertEqual(u1_auth.permissions['repositories'][HG_REPO], perms['repositories'][HG_REPO]) @@ -125,7 +125,7 @@ class TestPermissions(BaseTestCase): perms = { 'repositories_groups': {u'test1': 'group.admin', u'test2': 'group.admin'}, 'global': set(['hg.admin', 'hg.create.write_on_repogroup.true']), - 'repositories': {u'vcs_test_hg': 'repository.admin'} + 'repositories': {HG_REPO: 'repository.admin'} } self.assertEqual(a1_auth.permissions['repositories'][HG_REPO], @@ -158,7 +158,7 @@ class TestPermissions(BaseTestCase): 'repositories_groups': {}, 'global': set([u'hg.create.repository', u'repository.read', u'hg.register.manual_activate']), - 'repositories': {u'vcs_test_hg': u'repository.read'} + 'repositories': {HG_REPO: u'repository.read'} } self.assertEqual(u1_auth.permissions['repositories'][HG_REPO], new_perm) @@ -181,7 +181,7 @@ class TestPermissions(BaseTestCase): 'repositories_groups': {}, 'global': set([u'hg.create.repository', u'repository.read', u'hg.register.manual_activate']), - 'repositories': {u'vcs_test_hg': u'repository.read'} + 'repositories': {HG_REPO: u'repository.read'} } self.assertEqual(u3_auth.permissions['repositories'][HG_REPO], new_perm_gr) @@ -215,7 +215,7 @@ class TestPermissions(BaseTestCase): 'repositories_groups': {}, 'global': set([u'hg.create.repository', u'repository.read', u'hg.register.manual_activate']), - 'repositories': {u'vcs_test_hg': u'repository.write'} + 'repositories': {HG_REPO: u'repository.write'} } self.assertEqual(u1_auth.permissions['repositories'][HG_REPO], new_perm_h)