summaryrefslogtreecommitdiffstats
path: root/nova/tests/test_service.py
diff options
context:
space:
mode:
authorKei Masumoto <masumotok@nttdata.co.jp>2011-02-15 04:36:46 +0900
committerKei Masumoto <masumotok@nttdata.co.jp>2011-02-15 04:36:46 +0900
commit1518e66d0c4a4a72b6893cb117648f81dd3e3aff (patch)
tree2b72d3386b287eb8c950d28f1c59185cfca1b36d /nova/tests/test_service.py
parent2b7e2e8c1479fd2931ad6d99a9c1865976e44c21 (diff)
parent10626fc89e0f842b095b7c5864bb91e762984fbc (diff)
downloadnova-1518e66d0c4a4a72b6893cb117648f81dd3e3aff.tar.gz
nova-1518e66d0c4a4a72b6893cb117648f81dd3e3aff.tar.xz
nova-1518e66d0c4a4a72b6893cb117648f81dd3e3aff.zip
Merge request candidate version.
1. ISCSI checker is added 2. pep8 check, etc.
Diffstat (limited to 'nova/tests/test_service.py')
-rw-r--r--nova/tests/test_service.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/nova/tests/test_service.py b/nova/tests/test_service.py
index 60cef9428..cb65584cf 100644
--- a/nova/tests/test_service.py
+++ b/nova/tests/test_service.py
@@ -42,20 +42,25 @@ class FakeManager(manager.Manager):
def test_method(self):
return 'manager'
-# temporary variable to store host/binary/self.mox from each method to fake class.
+# temporary variable to store host/binary/self.mox
+# from each method to fake class.
global_host = None
global_binary = None
global_mox = None
+
+
class FakeComputeManager(compute_manager.ComputeManager):
"""Fake computemanager manager for tests"""
-
+
def __init__(self, compute_driver=None, *args, **kwargs):
global ghost, gbinary, gmox
self.update_available_resource(mox.IgnoreArg())
gmox.ReplayAll()
- super(FakeComputeManager, self).__init__(compute_driver, *args, **kwargs)
+ super(FakeComputeManager, self).__init__(compute_driver,
+ *args,
+ **kwargs)
+
-
class ExtendedService(service.Service):
def test_method(self):
return 'service'
@@ -299,7 +304,8 @@ class ServiceTestCase(test.TestCase):
binary).AndRaise(exception.NotFound())
service.db.service_create(mox.IgnoreArg(),
service_create).AndReturn(service_ref)
- self.mox.StubOutWithMock(compute_manager.ComputeManager, 'update_available_resource')
+ self.mox.StubOutWithMock(compute_manager.ComputeManager,
+ 'update_available_resource')
global ghost, gbinary, gmox
ghost = host