Add test_findMultivimDriver_no_type 39/38339/1
authorEthan Lynn <ethanlynnl@vmware.com>
Mon, 26 Mar 2018 02:47:23 +0000 (19:47 -0700)
committerEthan Lynn <ethanlynnl@vmware.com>
Mon, 26 Mar 2018 02:48:25 +0000 (19:48 -0700)
Add test_findMultivimDriver_no_type

Change-Id: I876e14e9cb82b9fc057394a4db00ce876d093aab
Issue-ID: MULTICLOUD-198
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
multivimbroker/multivimbroker/tests/test_syscomm.py

index ac43877..9e234e4 100644 (file)
@@ -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)