From 157d04a2c21145ff0b167d1e86847eb43e2432e4 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Wed, 13 Jun 2018 11:19:08 +0800 Subject: Add test_get_hpa_hugepage_any Add test_get_hpa_hugepage_any Change-Id: I91e92f1a4e855912bb144c0316187a6c7dae71c7 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn --- vio/vio/tests/test_aai_client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py index 7837e2d..364caca 100644 --- a/vio/vio/tests/test_aai_client.py +++ b/vio/vio/tests/test_aai_client.py @@ -323,3 +323,11 @@ class TestAAIClient(unittest.TestCase): ret = self.view._get_hugepages_capabilities(extra) self.assertIn( "8", ret["hpa-feature-attributes"][0]["hpa-attribute-value"]) + + @mock.patch.object(restcall, "call_req") + def test_get_hpa_hugepage_any(self, mock_call): + extra = { + "hw:mem_page_size": "any", + } + ret = self.view._get_hugepages_capabilities(extra) + self.assertEqual(0, len(ret["hpa-feature-attributes"])) -- cgit 1.2.3-korg