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
This commit is contained in:
parent
902e37c3c7
commit
2acaceb478
|
@ -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()
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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__,
|
||||
|
|
Loading…
Reference in New Issue