diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-07-26 17:38:54 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-07-26 17:38:54 +0800 |
commit | c0901c44ad55cb953de522f4a49cf88274c07d7b (patch) | |
tree | 9fe1aa1b8c656bfc1544e0b219209eff8d7211db | |
parent | 98bbf0dae2c94636a1b590c9c3de17a0b542506f (diff) |
Mock get_auto_id function when run unit test
Change-Id: Iabbcf576295339eeed21c2e091c7f910e2b85dad
Issue-ID: VFC-986
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | catalog/settings.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/catalog/settings.py b/catalog/settings.py index c8f7e0b3..8f4f36ba 100644 --- 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 |