From 850836003be84588216b2ee7bc2375a32e41880d Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 6 Feb 2013 10:25:14 -0500 Subject: Default the last parameter (state) in task_log_get to None Change the method signature to match the other definitions of task_log_get Fixes LP# 1117263 Change-Id: I510c05d4520c579bf07953d9ed05d7a58e051695 --- nova/tests/conductor/test_conductor.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py index d9d6f2db5..845485c19 100644 --- a/nova/tests/conductor/test_conductor.py +++ b/nova/tests/conductor/test_conductor.py @@ -446,6 +446,15 @@ class _BaseTestCase(object): 'end', 'host', 'state') self.assertEqual(result, 'result') + def test_task_log_get_with_no_state(self): + self.mox.StubOutWithMock(db, 'task_log_get') + db.task_log_get(self.context, 'task', 'begin', 'end', + 'host', None).AndReturn('result') + self.mox.ReplayAll() + result = self.conductor.task_log_get(self.context, 'task', 'begin', + 'end', 'host') + self.assertEqual(result, 'result') + def test_task_log_begin_task(self): self.mox.StubOutWithMock(db, 'task_log_begin_task') db.task_log_begin_task(self.context.elevated(), 'task', 'begin', -- cgit