From c560b9542571e1a77178247ee3073f4f7049d561 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Thu, 26 Jul 2018 17:35:53 +0800 Subject: Mock get_auto_id function when run unit test Change-Id: I95448d5998da94d48088956eedea88647a3c705d Issue-ID: VFC-986 Signed-off-by: fujinhua --- lcm/lcm/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lcm/lcm/settings.py b/lcm/lcm/settings.py index e72e256c..edba0e3d 100644 --- a/lcm/lcm/settings.py +++ b/lcm/lcm/settings.py @@ -175,3 +175,8 @@ if 'test' in sys.argv: TEST_OUTPUT_VERBOSE = True TEST_OUTPUT_DESCRIPTIONS = True TEST_OUTPUT_DIR = 'test-reports' + + import mock + from lcm.pub.utils import idutil + idutil.get_auto_id = mock.Mock() + idutil.get_auto_id.return_value = 1 -- cgit 1.2.3-korg