summaryrefslogtreecommitdiffstats
path: root/multivimbroker
diff options
context:
space:
mode:
authorLiang Ke <lokyse@163.com>2018-03-26 02:08:58 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-26 02:08:58 +0000
commitd802910ee2a9a4cc0b66db3925b77710e163d588 (patch)
tree4b307a7a57b48cf09a2e54667c6bd82f627e7f05 /multivimbroker
parenta2be701e860a06df93083888e7d5f8c64cea4183 (diff)
parent3b7133a34ea3b55c65c646d92a6e905b62d9e2e5 (diff)
Merge "Add test_req_by_msb"
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)