Mercurial > kallithea
changeset 5711:5adc4ad9ce77
pytest migration: convert simple functional tests to TestControllerPytest
Replace usage of TestController with TestControllerPytest for those files in
tests/functional where there is no setUp/tearDown method (the pytest
equivalent to be investigated) and that do not use test parametrization.
line wrap: on
line diff
--- a/kallithea/tests/functional/test_admin_auth_settings.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_admin_auth_settings.py Wed Feb 10 18:29:43 2016 +0100 @@ -2,7 +2,7 @@ from kallithea.model.db import Setting -class TestAuthSettingsController(TestController): +class TestAuthSettingsController(TestControllerPytest): def _enable_plugins(self, plugins_list): test_url = url(controller='admin/auth_settings', action='auth_settings')
--- a/kallithea/tests/functional/test_admin_defaults.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_admin_defaults.py Wed Feb 10 18:29:43 2016 +0100 @@ -2,7 +2,7 @@ from kallithea.model.db import Setting -class TestDefaultsController(TestController): +class TestDefaultsController(TestControllerPytest): def test_index(self): self.log_user()
--- a/kallithea/tests/functional/test_admin_permissions.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_admin_permissions.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,7 +1,7 @@ from kallithea.model.db import User, UserIpMap from kallithea.tests import * -class TestAdminPermissionsController(TestController): +class TestAdminPermissionsController(TestControllerPytest): def test_index(self): self.log_user()
--- a/kallithea/tests/functional/test_admin_repo_groups.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_admin_repo_groups.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,4 +1,4 @@ from kallithea.tests import * -class TestRepoGroupsController(TestController): +class TestRepoGroupsController(TestControllerPytest): pass
--- a/kallithea/tests/functional/test_admin_settings.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_admin_settings.py Wed Feb 10 18:29:43 2016 +0100 @@ -7,7 +7,7 @@ fixture = Fixture() -class TestAdminSettingsController(TestController): +class TestAdminSettingsController(TestControllerPytest): def test_index_main(self): self.log_user()
--- a/kallithea/tests/functional/test_admin_user_groups.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_admin_user_groups.py Wed Feb 10 18:29:43 2016 +0100 @@ -6,7 +6,7 @@ TEST_USER_GROUP = u'admins_test' -class TestAdminUsersGroupsController(TestController): +class TestAdminUsersGroupsController(TestControllerPytest): def test_index(self): self.log_user()
--- a/kallithea/tests/functional/test_admin_users.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_admin_users.py Wed Feb 10 18:29:43 2016 +0100 @@ -532,7 +532,7 @@ # u._get_user_or_raise_if_default(User.get_default_user().user_id) -class TestAdminUsersControllerForDefaultUser(TestController): +class TestAdminUsersControllerForDefaultUser(TestControllerPytest): """ Edit actions on the default user are not allowed. Validate that they throw a 404 exception.
--- a/kallithea/tests/functional/test_branches.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_branches.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,7 +1,7 @@ from kallithea.tests import * -class TestBranchesController(TestController): +class TestBranchesController(TestControllerPytest): def test_index_hg(self): self.log_user()
--- a/kallithea/tests/functional/test_changelog.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_changelog.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,7 +1,7 @@ from kallithea.tests import * -class TestChangelogController(TestController): +class TestChangelogController(TestControllerPytest): def test_index_hg(self): self.log_user()
--- a/kallithea/tests/functional/test_changeset.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_changeset.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,6 +1,6 @@ from kallithea.tests import * -class TestChangesetController(TestController): +class TestChangesetController(TestControllerPytest): def test_index(self): response = self.app.get(url(controller='changeset', action='index',
--- a/kallithea/tests/functional/test_compare_local.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_compare_local.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from kallithea.tests import * -class TestCompareController(TestController): +class TestCompareController(TestControllerPytest): def test_compare_tag_hg(self): self.log_user()
--- a/kallithea/tests/functional/test_feed.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_feed.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,6 +1,6 @@ from kallithea.tests import * -class TestFeedController(TestController): +class TestFeedController(TestControllerPytest): def test_rss(self): self.log_user()
--- a/kallithea/tests/functional/test_followers.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_followers.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,7 +1,7 @@ from kallithea.tests import * -class TestFollowersController(TestController): +class TestFollowersController(TestControllerPytest): def test_index_hg(self): self.log_user()
--- a/kallithea/tests/functional/test_home.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_home.py Wed Feb 10 18:29:43 2016 +0100 @@ -9,7 +9,7 @@ fixture = Fixture() -class TestHomeController(TestController): +class TestHomeController(TestControllerPytest): def test_index(self): self.log_user()
--- a/kallithea/tests/functional/test_journal.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_journal.py Wed Feb 10 18:29:43 2016 +0100 @@ -2,7 +2,7 @@ import datetime -class TestJournalController(TestController): +class TestJournalController(TestControllerPytest): def test_index(self): self.log_user()
--- a/kallithea/tests/functional/test_pullrequests.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_pullrequests.py Wed Feb 10 18:29:43 2016 +0100 @@ -8,7 +8,7 @@ fixture = Fixture() -class TestPullrequestsController(TestController): +class TestPullrequestsController(TestControllerPytest): def test_index(self): self.log_user()
--- a/kallithea/tests/functional/test_repo_groups.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_repo_groups.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,7 +1,7 @@ from kallithea.tests import * -class TestRepoGroupsController(TestController): +class TestRepoGroupsController(TestControllerPytest): def test_index(self): self.log_user()
--- a/kallithea/tests/functional/test_summary.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_summary.py Wed Feb 10 18:29:43 2016 +0100 @@ -22,7 +22,7 @@ fixture = Fixture() -class TestSummaryController(TestController): +class TestSummaryController(TestControllerPytest): def test_index(self): self.log_user()
--- a/kallithea/tests/functional/test_tags.py Wed Feb 10 19:26:22 2016 +0100 +++ b/kallithea/tests/functional/test_tags.py Wed Feb 10 18:29:43 2016 +0100 @@ -1,7 +1,7 @@ from kallithea.tests import * -class TestTagsController(TestController): +class TestTagsController(TestControllerPytest): def test_index_hg(self): self.log_user()