summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:17:42 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:17:42 +0800
commitc958a4ab2fb579e44766f67d4a7cef9e4596cf3c (patch)
tree9e046252caf66da29116ac314d8e83afe5722758
parent44d09edbc140b202c34bcba850f190b0e3c379c4 (diff)
Add test_get_hpa_hugepage_int
Add test_get_hpa_hugepage_int Change-Id: Iba00a75d0fb91bf80065919e4f18c4c28f8f83d5 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-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 abf7618..7837e2d 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -314,3 +314,12 @@ class TestAAIClient(unittest.TestCase):
ret = self.view._get_hugepages_capabilities(extra)
self.assertIn(
"4", ret["hpa-feature-attributes"][0]["hpa-attribute-value"])
+
+ @mock.patch.object(restcall, "call_req")
+ def test_get_hpa_hugepage_int(self, mock_call):
+ extra = {
+ "hw:mem_page_size": 8,
+ }
+ ret = self.view._get_hugepages_capabilities(extra)
+ self.assertIn(
+ "8", ret["hpa-feature-attributes"][0]["hpa-attribute-value"])