summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorEric Day <eday@oddments.org>2010-10-21 11:49:51 -0700
committerEric Day <eday@oddments.org>2010-10-21 11:49:51 -0700
commite012a2b73725bded6d4ac39747d57affda545770 (patch)
tree3c675423e1d7f5b187b70723bf0d02b3f1e5d1b5 /nova/tests
parent3e3407f2e4f44e7f717bba94219bb0023695fc4d (diff)
PEP8 and pylint cleanup. There should be no functional changes here, just style changes to get violations down.
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/__init__.py4
-rw-r--r--nova/tests/api_unittest.py2
-rw-r--r--nova/tests/compute_unittest.py4
-rw-r--r--nova/tests/network_unittest.py4
-rw-r--r--nova/tests/objectstore_unittest.py8
-rw-r--r--nova/tests/quota_unittest.py4
-rw-r--r--nova/tests/rpc_unittest.py2
-rw-r--r--nova/tests/scheduler_unittest.py6
-rw-r--r--nova/tests/service_unittest.py2
-rw-r--r--nova/tests/volume_unittest.py2
10 files changed, 19 insertions, 19 deletions
diff --git a/nova/tests/api/__init__.py b/nova/tests/api/__init__.py
index f051e2390..a0681f414 100644
--- a/nova/tests/api/__init__.py
+++ b/nova/tests/api/__init__.py
@@ -32,10 +32,10 @@ from nova.tests.api.fakes import APIStub
class Test(unittest.TestCase):
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
self.stubs = stubout.StubOutForTesting()
- def tearDown(self): # pylint: disable-msg=C0103
+ def tearDown(self):
self.stubs.UnsetAll()
def _request(self, url, subdomain, **kwargs):
diff --git a/nova/tests/api_unittest.py b/nova/tests/api_unittest.py
index 3f60f38f2..55a7ff32f 100644
--- a/nova/tests/api_unittest.py
+++ b/nova/tests/api_unittest.py
@@ -101,7 +101,7 @@ class XmlConversionTestCase(test.BaseTestCase):
class ApiEc2TestCase(test.BaseTestCase):
"""Unit test for the cloud controller on an EC2 API"""
- def setUp(self): # pylint: disable-msg=C0103,C0111
+ def setUp(self):
super(ApiEc2TestCase, self).setUp()
self.manager = manager.AuthManager()
diff --git a/nova/tests/compute_unittest.py b/nova/tests/compute_unittest.py
index 01e1bcd30..01b5651df 100644
--- a/nova/tests/compute_unittest.py
+++ b/nova/tests/compute_unittest.py
@@ -37,7 +37,7 @@ FLAGS = flags.FLAGS
class ComputeTestCase(test.TrialTestCase):
"""Test case for compute"""
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
logging.getLogger().setLevel(logging.DEBUG)
super(ComputeTestCase, self).setUp()
self.flags(connection_type='fake',
@@ -48,7 +48,7 @@ class ComputeTestCase(test.TrialTestCase):
self.project = self.manager.create_project('fake', 'fake', 'fake')
self.context = context.get_admin_context()
- def tearDown(self): # pylint: disable-msg=C0103
+ def tearDown(self):
self.manager.delete_user(self.user)
self.manager.delete_project(self.project)
super(ComputeTestCase, self).tearDown()
diff --git a/nova/tests/network_unittest.py b/nova/tests/network_unittest.py
index e8dd2624f..44cf47407 100644
--- a/nova/tests/network_unittest.py
+++ b/nova/tests/network_unittest.py
@@ -35,7 +35,7 @@ FLAGS = flags.FLAGS
class NetworkTestCase(test.TrialTestCase):
"""Test cases for network code"""
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
super(NetworkTestCase, self).setUp()
# NOTE(vish): if you change these flags, make sure to change the
# flags in the corresponding section in nova-dhcpbridge
@@ -65,7 +65,7 @@ class NetworkTestCase(test.TrialTestCase):
instance_ref = self._create_instance(1)
self.instance2_id = instance_ref['id']
- def tearDown(self): # pylint: disable-msg=C0103
+ def tearDown(self):
super(NetworkTestCase, self).tearDown()
# TODO(termie): this should really be instantiating clean datastores
# in between runs, one failure kills all the tests
diff --git a/nova/tests/objectstore_unittest.py b/nova/tests/objectstore_unittest.py
index f096ac6fe..d1604c4e5 100644
--- a/nova/tests/objectstore_unittest.py
+++ b/nova/tests/objectstore_unittest.py
@@ -57,7 +57,7 @@ os.makedirs(os.path.join(OSS_TEMPDIR, 'buckets'))
class ObjectStoreTestCase(test.TrialTestCase):
"""Test objectstore API directly."""
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
"""Setup users and projects."""
super(ObjectStoreTestCase, self).setUp()
self.flags(buckets_path=os.path.join(OSS_TEMPDIR, 'buckets'),
@@ -73,7 +73,7 @@ class ObjectStoreTestCase(test.TrialTestCase):
self.auth_manager.create_project('proj2', 'user2', 'a proj', ['user2'])
self.context = context.RequestContext('user1', 'proj1')
- def tearDown(self): # pylint: disable-msg=C0103
+ def tearDown(self):
"""Tear down users and projects."""
self.auth_manager.delete_project('proj1')
self.auth_manager.delete_project('proj2')
@@ -194,7 +194,7 @@ class TestSite(server.Site):
class S3APITestCase(test.TrialTestCase):
"""Test objectstore through S3 API."""
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
"""Setup users, projects, and start a test server."""
super(S3APITestCase, self).setUp()
@@ -309,7 +309,7 @@ class S3APITestCase(test.TrialTestCase):
deferred.addCallback(self._ensure_no_buckets)
return deferred
- def tearDown(self): # pylint: disable-msg=C0103
+ def tearDown(self):
"""Tear down auth and test server."""
self.auth_manager.delete_user('admin')
self.auth_manager.delete_project('admin')
diff --git a/nova/tests/quota_unittest.py b/nova/tests/quota_unittest.py
index 72e44bf52..92f3be508 100644
--- a/nova/tests/quota_unittest.py
+++ b/nova/tests/quota_unittest.py
@@ -33,7 +33,7 @@ FLAGS = flags.FLAGS
class QuotaTestCase(test.TrialTestCase):
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
logging.getLogger().setLevel(logging.DEBUG)
super(QuotaTestCase, self).setUp()
self.flags(connection_type='fake',
@@ -51,7 +51,7 @@ class QuotaTestCase(test.TrialTestCase):
self.context = context.RequestContext(project=self.project,
user=self.user)
- def tearDown(self): # pylint: disable-msg=C0103
+ def tearDown(self):
manager.AuthManager().delete_project(self.project)
manager.AuthManager().delete_user(self.user)
super(QuotaTestCase, self).tearDown()
diff --git a/nova/tests/rpc_unittest.py b/nova/tests/rpc_unittest.py
index 5d2bb1046..c380393a0 100644
--- a/nova/tests/rpc_unittest.py
+++ b/nova/tests/rpc_unittest.py
@@ -33,7 +33,7 @@ FLAGS = flags.FLAGS
class RpcTestCase(test.TrialTestCase):
"""Test cases for rpc"""
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
super(RpcTestCase, self).setUp()
self.conn = rpc.Connection.instance()
self.receiver = TestReceiver()
diff --git a/nova/tests/scheduler_unittest.py b/nova/tests/scheduler_unittest.py
index 379f8cdc8..166a32702 100644
--- a/nova/tests/scheduler_unittest.py
+++ b/nova/tests/scheduler_unittest.py
@@ -44,7 +44,7 @@ class TestDriver(driver.Scheduler):
class SchedulerTestCase(test.TrialTestCase):
"""Test case for scheduler"""
- def setUp(self): # pylint: disable=C0103
+ def setUp(self):
super(SchedulerTestCase, self).setUp()
self.flags(scheduler_driver='nova.tests.scheduler_unittest.TestDriver')
@@ -73,7 +73,7 @@ class SchedulerTestCase(test.TrialTestCase):
class SimpleDriverTestCase(test.TrialTestCase):
"""Test case for simple driver"""
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
super(SimpleDriverTestCase, self).setUp()
self.flags(connection_type='fake',
max_cores=4,
@@ -87,7 +87,7 @@ class SimpleDriverTestCase(test.TrialTestCase):
self.project = self.manager.create_project('fake', 'fake', 'fake')
self.context = context.get_admin_context()
- def tearDown(self): # pylint: disable-msg=C0103
+ def tearDown(self):
self.manager.delete_user(self.user)
self.manager.delete_project(self.project)
diff --git a/nova/tests/service_unittest.py b/nova/tests/service_unittest.py
index 8533fab0a..6df108a98 100644
--- a/nova/tests/service_unittest.py
+++ b/nova/tests/service_unittest.py
@@ -78,7 +78,7 @@ class ServiceManagerTestCase(test.BaseTestCase):
class ServiceTestCase(test.BaseTestCase):
"""Test cases for Services"""
- def setUp(self): # pylint: disable=C0103
+ def setUp(self):
super(ServiceTestCase, self).setUp()
self.mox.StubOutWithMock(service, 'db')
self.context = context.get_admin_context()
diff --git a/nova/tests/volume_unittest.py b/nova/tests/volume_unittest.py
index 8e2fa11c1..20bae8a7f 100644
--- a/nova/tests/volume_unittest.py
+++ b/nova/tests/volume_unittest.py
@@ -34,7 +34,7 @@ FLAGS = flags.FLAGS
class VolumeTestCase(test.TrialTestCase):
"""Test Case for volumes"""
- def setUp(self): # pylint: disable-msg=C0103
+ def setUp(self):
logging.getLogger().setLevel(logging.DEBUG)
super(VolumeTestCase, self).setUp()
self.compute = utils.import_object(FLAGS.compute_manager)