From 80c628336144ed88538292d7db5a6c439f8d866d Mon Sep 17 00:00:00 2001 From: liuyamin Date: Thu, 17 Aug 2017 11:09:29 +0800 Subject: [PATCH] Remove unnecessary setUp function in testcase In testcase, setUp will be called automatically. This patch used to remove setUp functions that do nothing. Besides, it will keep code clean. Change-Id: I2bf79884704974dc00196816f7de43580b474d3e --- oslo_messaging/tests/test_exception_serialization.py | 3 --- oslo_messaging/tests/test_opts.py | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/oslo_messaging/tests/test_exception_serialization.py b/oslo_messaging/tests/test_exception_serialization.py index a6922828f..d2a10c7aa 100644 --- a/oslo_messaging/tests/test_exception_serialization.py +++ b/oslo_messaging/tests/test_exception_serialization.py @@ -99,9 +99,6 @@ class SerializeRemoteExceptionTestCase(test_utils.BaseTestCase): cls.scenarios = testscenarios.multiply_scenarios(cls._add_remote, cls._exception_types) - def setUp(self): - super(SerializeRemoteExceptionTestCase, self).setUp() - def test_serialize_remote_exception(self): try: try: diff --git a/oslo_messaging/tests/test_opts.py b/oslo_messaging/tests/test_opts.py index 06e7d6fd1..6e10c51cf 100644 --- a/oslo_messaging/tests/test_opts.py +++ b/oslo_messaging/tests/test_opts.py @@ -24,12 +24,9 @@ except ImportError: from oslo_messaging.tests import utils as test_utils +@testtools.skipIf(opts is None, "Options not importable") class OptsTestCase(test_utils.BaseTestCase): - @testtools.skipIf(opts is None, "Options not importable") - def setUp(self): - super(OptsTestCase, self).setUp() - def _test_list_opts(self, result): self.assertEqual(7, len(result))