summaryrefslogtreecommitdiffstats
path: root/multivimbroker
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-03-23 11:12:10 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-03-23 11:15:59 +0800
commit3b7133a34ea3b55c65c646d92a6e905b62d9e2e5 (patch)
treebc22977100259286db5c1368c4d2cd1883a39a62 /multivimbroker
parent0ed08905a821ab0c1d1a2ed5cc1d4fe605d94e64 (diff)
Add test_req_by_msb
Add tests test_req_by_msb for restcall.py Change-Id: Ic50d07a52522d67a6f760b5e332e1c93610a45f6 Issue-ID: MULTICLOUD-198 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'multivimbroker')
-rw-r--r--multivimbroker/multivimbroker/tests/test_restcall.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/multivimbroker/multivimbroker/tests/test_restcall.py b/multivimbroker/multivimbroker/tests/test_restcall.py
index 4ecf04e..235d58a 100644
--- a/multivimbroker/multivimbroker/tests/test_restcall.py
+++ b/multivimbroker/multivimbroker/tests/test_restcall.py
@@ -41,3 +41,15 @@ class TestRestCall(unittest.TestCase):
mock_call.assert_called_once_with(
expect_url, expect_user, expect_pass, restcall.rest_no_auth,
res, "GET", content, expect_headers)
+
+ @mock.patch.object(restcall, "call_req")
+ def test_req_by_msb(self, mock_call):
+ res = "multicloud"
+ method = "GET"
+ content = "no content"
+ headers = None
+ restcall.req_by_msb(res, method, content=content, headers=headers)
+ expect_url = "http://127.0.0.1:10080/"
+ mock_call.assert_called_once_with(
+ expect_url, "", "", restcall.rest_no_auth, res, method,
+ content, headers)