Code Review
/
vfc
/
nfvo
/
catalog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
98bbf0d
)
Mock get_auto_id function when run unit test
79/57679/1
author
fujinhua
<fu.jinhua@zte.com.cn>
Thu, 26 Jul 2018 09:38:54 +0000
(17:38 +0800)
committer
fujinhua
<fu.jinhua@zte.com.cn>
Thu, 26 Jul 2018 09:38:54 +0000
(17:38 +0800)
Change-Id: Iabbcf576295339eeed21c2e091c7f910e2b85dad
Issue-ID: VFC-986
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
catalog/settings.py
patch
|
blob
|
history
diff --git
a/catalog/settings.py
b/catalog/settings.py
index
c8f7e0b
..
8f4f36b
100644
(file)
--- a/
catalog/settings.py
+++ b/
catalog/settings.py
@@
-182,3
+182,8
@@
if 'test' in sys.argv:
TEST_OUTPUT_VERBOSE = True
TEST_OUTPUT_DESCRIPTIONS = True
TEST_OUTPUT_DIR = 'test-reports'
+
+ import mock
+ from catalog.pub.utils import idutil
+ idutil.get_auto_id = mock.Mock()
+ idutil.get_auto_id.return_value = 1