From a25e58d40cc5bbc50790d27c379fcb8c847118f7 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Mar 02 2018 11:09:10 +0000 Subject: Fix duplicated test names This actually causes some of the tests not to run. --- diff --git a/tests/test_pagure_flask_ui_app_give_project.py b/tests/test_pagure_flask_ui_app_give_project.py index 60aca12..0fbe8dd 100644 --- a/tests/test_pagure_flask_ui_app_give_project.py +++ b/tests/test_pagure_flask_ui_app_give_project.py @@ -175,7 +175,7 @@ class PagureFlaskGiveRepotests(tests.SimplePagureTest): self._check_user() - def test_give_project_not_owner(self): + def test_give_project_not_owner_but_is_admin(self): """ Test the give_project endpoint. """ project = pagure.lib.get_authorized_project( self.session, project_name='test') diff --git a/tests/test_pagure_flask_ui_app_index.py b/tests/test_pagure_flask_ui_app_index.py index 23057b1..666eab1 100644 --- a/tests/test_pagure_flask_ui_app_index.py +++ b/tests/test_pagure_flask_ui_app_index.py @@ -257,7 +257,7 @@ class PagureFlaskAppIndextests(tests.Modeltests): self.assertEqual( output.data.count('
'), 6) - def test_index_admin_access_while_commit(self): + def test_index_admin_access_while_admin(self): """ Test the index endpoint filter for admin access only when user is an admin. """ tests.create_projects(self.session) diff --git a/tests/test_pagure_flask_ui_old_commit.py b/tests/test_pagure_flask_ui_old_commit.py index 01b8ab0..2023094 100644 --- a/tests/test_pagure_flask_ui_old_commit.py +++ b/tests/test_pagure_flask_ui_old_commit.py @@ -42,7 +42,7 @@ class PagureFlaskRepoOldUrltests(tests.SimplePagureTest): self.path, 'releases') @patch.dict('pagure.config.config', {'OLD_VIEW_COMMIT_ENABLED': True}) - def test_view_commit_old(self): + def test_view_commit_old_with_bogus_url(self): """ Test the view_commit_old endpoint. """ tests.create_projects(self.session) diff --git a/tests/test_pagure_lib.py b/tests/test_pagure_lib.py index fc18239..367ebe0 100644 --- a/tests/test_pagure_lib.py +++ b/tests/test_pagure_lib.py @@ -2563,7 +2563,7 @@ class PagureLibtests(tests.Modeltests): @patch('pagure.lib.REDIS') @patch('pagure.lib.notify.send_email', MagicMock(return_value=True)) @patch('pagure.lib.PAGURE_CI', MagicMock(return_value=True)) - def test_add_pull_request_comment(self, mock_redis): + def test_add_pull_request_comment_to_re_run_ci(self, mock_redis): """ Test add_pull_request_comment of pagure.lib. """ mock_redis.return_value = True diff --git a/tests/test_pagure_lib_gitolite_config.py b/tests/test_pagure_lib_gitolite_config.py index 6b64a13..5764b78 100644 --- a/tests/test_pagure_lib_gitolite_config.py +++ b/tests/test_pagure_lib_gitolite_config.py @@ -143,9 +143,9 @@ class PagureLibGitoliteConfigtests(tests.Modeltests): #print data self.assertEqual(data, exp) - def test_write_gitolite_pre_post_projectNone(self): + def test_write_gitolite_pre_post_projectNone_to_existing_file(self): """ Test the write_gitolite_acls function of pagure.lib.git with - a postconf set """ + a postconf set with existing output file """ with open(self.outputconf, 'w') as stream: pass