diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 11:02:59 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 11:08:47 +0800 |
commit | f82151ac7e9cc8f44c2317e56afb1b459a4bedae (patch) | |
tree | fddae699e4ea8c989a0d56570ecd4dec1e7d41ac | |
parent | 6081d6d12ced1304503068460f6063d2006f281b (diff) |
Add test_get_hpa_basic
Add test_get_hpa_basic
Change-Id: I2226c37da78002719946fefb523cad017afc3f88
Issue-ID: MULTICLOUD-199
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r-- | vio/vio/tests/test_aai_client.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py index d2b7633..dd7e5fe 100644 --- a/vio/vio/tests/test_aai_client.py +++ b/vio/vio/tests/test_aai_client.py @@ -268,3 +268,12 @@ class TestAAIClient(unittest.TestCase): self.view._get_ovsdpdk_capabilities.return_value = {"hpa": "basic"} ret = self.view._get_hpa_capabilities({"extra_specs": {}}) self.assertEqual([{"hpa": "basic"}]*9, ret) + + @mock.patch.object(restcall, "call_req") + def test_get_hpa_basic(self, mock_call): + flavor = { + "vcpus": 1, + "ram": 1024 + } + ret = self.view._get_hpa_basic_capabilities(flavor) + self.assertEqual(len(ret["hpa-feature-attributes"]), 2) |