diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-07-26 17:35:53 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-07-26 17:35:53 +0800 |
commit | c560b9542571e1a77178247ee3073f4f7049d561 (patch) | |
tree | 9fc846579181a790ea5f4960059626db6eebeb62 | |
parent | 312de8a04440b4f6c2af5b5ba54ca8d0fd538216 (diff) |
Mock get_auto_id function when run unit test
Change-Id: I95448d5998da94d48088956eedea88647a3c705d
Issue-ID: VFC-986
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | lcm/lcm/settings.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |