summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Ke <lokyse@163.com>2018-03-26 04:11:40 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-26 04:11:40 +0000
commit710f45c2c23a3295dabcbb40608669cbeaace6c7 (patch)
tree81000d37844bcd24b3b38ea656679fc97d0774bd
parent232d67e942a2ea7334a6835737bab50c355e978f (diff)
parent5b63b8ff552e856f1953749fc1875a7762d5302b (diff)
Merge "Add test_findMultivimDriver_no_type"
-rw-r--r--multivimbroker/multivimbroker/tests/test_syscomm.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/multivimbroker/multivimbroker/tests/test_syscomm.py b/multivimbroker/multivimbroker/tests/test_syscomm.py
index ac43877..9e234e4 100644
--- a/multivimbroker/multivimbroker/tests/test_syscomm.py
+++ b/multivimbroker/multivimbroker/tests/test_syscomm.py
@@ -11,6 +11,7 @@
import mock
import unittest
+from multivimbroker.pub import exceptions
from multivimbroker.pub.msapi import extsys
from multivimbroker.pub.utils import syscomm
@@ -37,3 +38,7 @@ class TestSyscomm(unittest.TestCase):
expect_path = "multicloud-ocata/v0/openstack_regionone/identity"
ret_path = syscomm.getMultivimDriver("openstack_regionone", full_path)
self.assertEqual(expect_path, ret_path)
+
+ def test_findMultivimDriver_no_type(self):
+ vim = {"type": "wrong type"}
+ self.assertRaises(exceptions.NotFound, syscomm.findMultivimDriver, vim)