Fix unittests broken by commit 2bb5c9115f
authorMichael Hanselmann <hansmi@google.com>
Mon, 20 Jul 2009 15:49:55 +0000 (17:49 +0200)
committerMichael Hanselmann <hansmi@google.com>
Mon, 20 Jul 2009 15:54:15 +0000 (17:54 +0200)
File "../test/ganeti.hooks_unittest.py", line 239, in setUp
  self.lu = FakeLU(FakeProc(), self.op, self.context, None)
File "…/ganeti/cmdlib.py", line 92, in __init__
  self.LogStep = processor.LogStep
AttributeError: FakeProc instance has no attribute 'LogStep'

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

test/mocks.py

index 58e68c3..4c0ae07 100644 (file)
@@ -61,6 +61,10 @@ class FakeProc:
     def LogInfo(self, msg, *args, **kwargs):
         pass
 
+    def LogStep(self, current, total, message):
+        pass
+
+
 class FakeContext:
     """Fake context object"""