From 657d47bfad3d88857f76b016e5e8bb133bda5388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Antal?= Date: Wed, 2 Aug 2017 11:25:22 +0200 Subject: [PATCH] Removed unnecessary setUp() calls in tests TrivialFix Change-Id: I16e440f7fe7cb57e0d05e30c8c75ead064b5b449 --- barbican/tests/api/test_init.py | 3 --- barbican/tests/cmd/test_db_cleanup.py | 3 --- barbican/tests/common/test_hrefs.py | 3 --- barbican/tests/model/test_models.py | 3 --- barbican/tests/plugin/util/test_multiple_backends.py | 3 --- barbican/tests/plugin/util/test_translations.py | 3 --- barbican/tests/tasks/test_certificate_resources.py | 3 --- barbican/tests/utils.py | 3 --- functionaltests/api/v1/functional/test_cas.py | 3 --- 9 files changed, 27 deletions(-) diff --git a/barbican/tests/api/test_init.py b/barbican/tests/api/test_init.py index 874d9d69b..58c1ab6b7 100644 --- a/barbican/tests/api/test_init.py +++ b/barbican/tests/api/test_init.py @@ -27,9 +27,6 @@ from barbican.tests import utils class WhenInvokingLoadBodyFunction(utils.BaseTestCase): """Tests the load_body function.""" - def setUp(self): - super(WhenInvokingLoadBodyFunction, self).setUp() - @mock.patch('pecan.abort') def test_should_abort_with_read_error(self, mock_pecan_abort): mock_pecan_abort.side_effect = ValueError('Abort!') diff --git a/barbican/tests/cmd/test_db_cleanup.py b/barbican/tests/cmd/test_db_cleanup.py index 56c7f0f16..b0ceeedb6 100644 --- a/barbican/tests/cmd/test_db_cleanup.py +++ b/barbican/tests/cmd/test_db_cleanup.py @@ -68,9 +68,6 @@ def _setup_entry(name, *args, **kwargs): class WhenTestingDBCleanUpCommand(utils.RepositoryTestCase): - def setUp(self): - super(WhenTestingDBCleanUpCommand, self).setUp() - def tearDown(self): super(WhenTestingDBCleanUpCommand, self).tearDown() repos.rollback() diff --git a/barbican/tests/common/test_hrefs.py b/barbican/tests/common/test_hrefs.py index 563e88a45..5aaca9125 100644 --- a/barbican/tests/common/test_hrefs.py +++ b/barbican/tests/common/test_hrefs.py @@ -19,9 +19,6 @@ from barbican.tests import utils as test_utils class WhenTestingGetContainerID(test_utils.BaseTestCase): - def setUp(self): - super(WhenTestingGetContainerID, self).setUp() - def test_get_container_id_passes(self): test_ref = 'https://localhost/v1/containers/good_container_ref' result = hrefs.get_container_id_from_ref(test_ref) diff --git a/barbican/tests/model/test_models.py b/barbican/tests/model/test_models.py index 4609f5262..18674e72c 100644 --- a/barbican/tests/model/test_models.py +++ b/barbican/tests/model/test_models.py @@ -555,9 +555,6 @@ class WhenCreatingNewContainerACLUser(utils.BaseTestCase): class WhenCreatingNewProjectQuotas(utils.BaseTestCase): - def setUp(self): - super(WhenCreatingNewProjectQuotas, self).setUp() - def test_create_new_project_quotas(self): project = models.Project() project.id = '12345' diff --git a/barbican/tests/plugin/util/test_multiple_backends.py b/barbican/tests/plugin/util/test_multiple_backends.py index 8487ebdee..8b9745acd 100644 --- a/barbican/tests/plugin/util/test_multiple_backends.py +++ b/barbican/tests/plugin/util/test_multiple_backends.py @@ -51,9 +51,6 @@ class MockedManager(object): class WhenReadingMultipleBackendsConfig(test_utils.MultipleBackendsTestCase): - def setUp(self): - super(WhenReadingMultipleBackendsConfig, self).setUp() - def test_successful_conf_read(self): ss_plugins = ['ss_p1', 'ss_p2', 'ss_p3'] cr_plugins = ['cr_p1', 'cr_p2', 'cr_p3'] diff --git a/barbican/tests/plugin/util/test_translations.py b/barbican/tests/plugin/util/test_translations.py index 23a2c8797..7e33f5e65 100644 --- a/barbican/tests/plugin/util/test_translations.py +++ b/barbican/tests/plugin/util/test_translations.py @@ -259,9 +259,6 @@ class WhenDenormalizingAfterDecryption(utils.BaseTestCase): class WhenConvertingKeyFormats(utils.BaseTestCase): - def setUp(self): - super(WhenConvertingKeyFormats, self).setUp() - def test_passes_convert_private_pem_to_der(self): pem = keys.get_private_key_pem() expected_der = keys.get_private_key_der() diff --git a/barbican/tests/tasks/test_certificate_resources.py b/barbican/tests/tasks/test_certificate_resources.py index 4c0a33dfc..bad132b3e 100644 --- a/barbican/tests/tasks/test_certificate_resources.py +++ b/barbican/tests/tasks/test_certificate_resources.py @@ -450,9 +450,6 @@ class BaseCertificateRequestsTestCase(database_utils.RepositoryTestCase): class WhenIssuingCertificateRequests(BaseCertificateRequestsTestCase): """Tests the 'issue_certificate_request()' function.""" - def setUp(self): - super(WhenIssuingCertificateRequests, self).setUp() - def tearDown(self): super(WhenIssuingCertificateRequests, self).tearDown() diff --git a/barbican/tests/utils.py b/barbican/tests/utils.py index 1adf08b46..893b817e8 100644 --- a/barbican/tests/utils.py +++ b/barbican/tests/utils.py @@ -536,9 +536,6 @@ def setup_multiple_secret_store_plugins_conf(testcase, store_plugin_names, class MultipleBackendsTestCase(database_utils.RepositoryTestCase): - def setUp(self): - super(MultipleBackendsTestCase, self).setUp() - def _mock_plugin_settings(self): kmip_conf = kss.CONF diff --git a/functionaltests/api/v1/functional/test_cas.py b/functionaltests/api/v1/functional/test_cas.py index 21338f84c..150dab7aa 100644 --- a/functionaltests/api/v1/functional/test_cas.py +++ b/functionaltests/api/v1/functional/test_cas.py @@ -566,9 +566,6 @@ class ListingCAsTestCase(CATestCommon): class ProjectCATestCase(CATestCommon): - def setUp(self): - super(ProjectCATestCase, self).setUp() - @depends_on_ca_plugins('snakeoil_ca', 'simple_certificate') def test_addition_of_project_ca_affects_getting_ca_list(self): # Getting list of CAs should get the total configured CAs