summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2019-04-11 14:06:08 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2019-04-11 14:07:25 +0800
commitf35a89304ffee58a46a932ee9df710523a876d18 (patch)
tree604210522ceec766d9e088f408dbd18665c5a094
parent9e0f9994c0cab7839f09816b7187b2cbd58ad877 (diff)
Add UT for add_servers function
Add unit test for add_vservers function Change-Id: I93c3042b78abc2464cf2b9553982f9ca8ac4e82c Issue-ID: MULTICLOUD-507 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--vio/vio/tests/test_aai_client.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py
index ad66f40..1875d4c 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -96,6 +96,19 @@ class TestAAIClient(unittest.TestCase):
mock_call.assert_called_once()
@mock.patch.object(restcall, "call_req")
+ def test_add_servers(self, mock_call):
+ servers = {
+ "servers": [{
+ "name": "server-name",
+ "id": "server-id",
+ "link": "/instances/server-id",
+ "status": "ACTIVE",
+ }]
+ }
+ self.view.add_vservers(servers)
+ mock_call.assert_called_once()
+
+ @mock.patch.object(restcall, "call_req")
def test_add_networks(self, mock_call):
networks = {
"networks": [{