summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-03-27 07:33:02 -0700
committerEthan Lynn <ethanlynnl@vmware.com>2018-03-27 07:33:02 -0700
commite53a085d62d69d70a4a596b1db5bc229828f55aa (patch)
tree9e23f75ea185233ad9d285f82674f501e56a1bc4
parent639dfd7c03650562b7e9d6cc8e1bf69fe11bbadc (diff)
Add test_req_by_msb
Add test_req_by_msb Change-Id: I47e909a439a4de8b2b0e36ac96c23bf38aa04a38 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--vio/vio/tests/test_restcall.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/vio/vio/tests/test_restcall.py b/vio/vio/tests/test_restcall.py
index 80e9ef3..83fc04e 100644
--- a/vio/vio/tests/test_restcall.py
+++ b/vio/vio/tests/test_restcall.py
@@ -41,3 +41,14 @@ 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"
+ restcall.req_by_msb(res, method, content=content)
+ expect_url = "http://127.0.0.1:10080/"
+ mock_call.assert_called_once_with(
+ expect_url, "", "", restcall.rest_no_auth, res, method,
+ content)