summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-03-26 12:03:30 -0700
committerEthan Lynn <ethanlynnl@vmware.com>2018-03-26 12:03:30 -0700
commitabb62387277c2c0a51fb62dff83cd78c92b74bfb (patch)
tree20773f024a539d8d57cc4abb40e4d618d14b8d3b
parent8cf428f5f10e139b2b3502d80df59081c5de5596 (diff)
Add test_add_flavors
Add test_add_flavors for AAIClient Change-Id: I671c8b3149bed7feac35f334b0cdeedfc18e4b48 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--vio/vio/tests/test_aai_client.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py
index e43796b..a3d0681 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -40,3 +40,22 @@ class TestAAIClient(unittest.TestCase):
tenants = {"tenants": [{"name": "admin", "id": "admin-id"}]}
self.view.add_tenants(tenants)
mock_call.assert_called_once()
+
+ @mock.patch.object(restcall, "call_req")
+ def test_add_flavors(self, mock_call):
+ flavors = {
+ "flavors": [{
+ "name": "m1.small",
+ "id": "1",
+ "vcpus": 1,
+ "ram": 512,
+ "disk": 10,
+ "ephemeral": 0,
+ "swap": 0,
+ "is_public": True,
+ "links": [{"href": "http://fake-url"}],
+ "is_disabled": False
+ }]
+ }
+ self.view.add_flavors(flavors)
+ mock_call.assert_called_once()