summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-03-26 12:21:01 -0700
committerEthan Lynn <ethanlynnl@vmware.com>2018-03-26 12:21:26 -0700
commitd12fae86982945353249fd702ea9954d9008f090 (patch)
tree2712643d87bfc0f0b760312a9d25c2aa776c9dca
parentb73962800ad896b822fb27a04644cb1c76ac7d0a (diff)
Add test_del_tenants
Add test_del_tenants for AAIClient Change-Id: I8aefcb2de0a144ccde5109b34ea1187689800e95 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 79f6bb5..cd9030e 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -97,3 +97,17 @@ class TestAAIClient(unittest.TestCase):
}
self.view.add_pservers(pservers)
self.assertEqual(mock_call.call_count, 2)
+
+ @mock.patch.object(restcall, "call_req")
+ def test_del_tenants(self, mock_call):
+ mock_call.return_value = [0]
+ rsp = {
+ "tenants": {
+ "tenant": [{
+ "tenant-id": "tenant-id",
+ "resource-version": "version-1"
+ }]
+ }
+ }
+ self.view._del_tenants(rsp)
+ mock_call.assert_called_once()