summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-03-26 22:04:42 -0700
committerEthan Lynn <ethanlynnl@vmware.com>2018-03-26 22:04:42 -0700
commit5a182222f7c5bf9251886c6e693576e429c26a3e (patch)
treeb09791f1c70decb15f2de7222486ccacb3e07de8
parentb804f9f12126ba3223928e1a05cba03c1c988bd0 (diff)
Add test_del_networks
Add test_del_networks for AAIClient Change-Id: I25f2754da819bd23a9e763b03e06f3b25ad26e26 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--vio/vio/tests/test_aai_client.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py
index 12ee35c..3811373 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -139,3 +139,17 @@ class TestAAIClient(unittest.TestCase):
}
self.view._del_images(rsp)
mock_call.assert_called_once()
+
+ @mock.patch.object(restcall, "call_req")
+ def test_del_networks(self, mock_call):
+ mock_call.return_value = [0]
+ rsp = {
+ "oam-networks": {
+ "oam-network": [{
+ "network-uuid": "fake-id",
+ "resource-version": "fake-version"
+ }]
+ }
+ }
+ self.view._del_networks(rsp)
+ mock_call.assert_called_once()