summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:15:33 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:15:33 +0800
commit9d9d588e5bdf813c30e2f0904fa33bd34b4a4943 (patch)
tree6dfbb65f1a51259ee9524f455236f8949c7cb440 /vio
parent6184c62c07824236deec259360d8634e8e6b7d35 (diff)
Add test_get_hpa_hugepage_large
Add test_get_hpa_hugepage_large Change-Id: I0a7c7015d9cacb0b71a13b1aa6df5d4bc6455d60 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r--vio/vio/tests/test_aai_client.py9
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 ea333d1..6be9958 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -296,3 +296,12 @@ class TestAAIClient(unittest.TestCase):
}
ret = self.view._get_cputopology_capabilities(extra)
self.assertEqual(len(ret["hpa-feature-attributes"]), 3)
+
+ @mock.patch.object(restcall, "call_req")
+ def test_get_hpa_hugepage_large(self, mock_call):
+ extra = {
+ "hw:mem_page_size": "large"
+ }
+ ret = self.view._get_hugepages_capabilities(extra)
+ self.assertIn(
+ "2", ret["hpa-feature-attributes"][0]["hpa-attribute-value"])