diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2019-04-11 14:06:08 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2019-04-11 14:07:25 +0800 |
commit | f35a89304ffee58a46a932ee9df710523a876d18 (patch) | |
tree | 604210522ceec766d9e088f408dbd18665c5a094 /vio | |
parent | 9e0f9994c0cab7839f09816b7187b2cbd58ad877 (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>
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio/tests/test_aai_client.py | 13 |
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": [{ |