From f82151ac7e9cc8f44c2317e56afb1b459a4bedae Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Wed, 13 Jun 2018 11:02:59 +0800 Subject: Add test_get_hpa_basic Add test_get_hpa_basic Change-Id: I2226c37da78002719946fefb523cad017afc3f88 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn --- vio/vio/tests/test_aai_client.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- cgit 1.2.3-korg