From 2acaceb4784bb26c12c32658640bad82e50515b9 Mon Sep 17 00:00:00 2001 From: Brant Knudson Date: Fri, 24 Jan 2014 16:08:20 -0600 Subject: [PATCH] Tests use setUp rather than init Test classes should put their initialization code into setUp rather than __init__. It gets called when the test starts. Change-Id: Ice0631c864334435b895bad145f3b5b14dc3bffc --- keystone/tests/test_cache.py | 6 ------ keystone/tests/test_sql_migrate_extensions.py | 4 ++-- keystone/tests/test_v3_federation.py | 3 --- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/keystone/tests/test_cache.py b/keystone/tests/test_cache.py index de0a79fad2..5fc49b12e9 100644 --- a/keystone/tests/test_cache.py +++ b/keystone/tests/test_cache.py @@ -74,9 +74,6 @@ class TestProxyValue(object): class CacheRegionTest(tests.TestCase): - def __init__(self, *args, **kwargs): - super(CacheRegionTest, self).__init__(*args, **kwargs) - self.region = None def setUp(self): super(CacheRegionTest, self).setUp() @@ -215,9 +212,6 @@ class CacheRegionTest(tests.TestCase): class CacheNoopBackendTest(tests.TestCase): - def __init__(self, *args, **kwargs): - super(CacheNoopBackendTest, self).__init__(*args, **kwargs) - self.region = None def setUp(self): super(CacheNoopBackendTest, self).setUp() diff --git a/keystone/tests/test_sql_migrate_extensions.py b/keystone/tests/test_sql_migrate_extensions.py index 604975b88e..3515a40e44 100644 --- a/keystone/tests/test_sql_migrate_extensions.py +++ b/keystone/tests/test_sql_migrate_extensions.py @@ -140,8 +140,8 @@ class EndpointFilterExtension(test_sql_upgrade.SqlMigrateBase): class FederationExtension(test_sql_upgrade.SqlMigrateBase): """Test class for ensuring the Federation SQL.""" - def __init__(self, *args, **kwargs): - super(FederationExtension, self).__init__(*args, **kwargs) + def setUp(self): + super(FederationExtension, self).setUp() self.identity_provider = 'identity_provider' self.federation_protocol = 'federation_protocol' self.mapping = 'mapping' diff --git a/keystone/tests/test_v3_federation.py b/keystone/tests/test_v3_federation.py index de7a7405d2..1b494b44fe 100644 --- a/keystone/tests/test_v3_federation.py +++ b/keystone/tests/test_v3_federation.py @@ -40,9 +40,6 @@ class FederationTests(test_v3.RestfulTestCase): EXTENSION_NAME = 'federation' EXTENSION_TO_ADD = 'federation_extension' - def __init__(self, *args, **kwargs): - super(FederationTests, self).__init__(*args, **kwargs) - def setup_database(self): super(FederationTests, self).setup_database() package_name = "%s.%s.migrate_repo" % (contrib.__name__,