From 6184c62c07824236deec259360d8634e8e6b7d35 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Wed, 13 Jun 2018 11:12:26 +0800 Subject: Add test_get_hpa_cputopo Add test_get_hpa_cputopo Change-Id: Ib409fed0ac233f8cae060b18d74bb3b37559c0cd Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn --- vio/vio/tests/test_aai_client.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py index 57c51f9..ea333d1 100644 --- a/vio/vio/tests/test_aai_client.py +++ b/vio/vio/tests/test_aai_client.py @@ -286,3 +286,13 @@ class TestAAIClient(unittest.TestCase): } ret = self.view._get_cpupinning_capabilities(extra) self.assertEqual(len(ret["hpa-feature-attributes"]), 2) + + @mock.patch.object(restcall, "call_req") + def test_get_hpa_cputopo(self, mock_call): + extra = { + "hw:cpu_sockets": 2, + "hw:cpu_cores": 2, + "hw:cpu_threads": 4 + } + ret = self.view._get_cputopology_capabilities(extra) + self.assertEqual(len(ret["hpa-feature-attributes"]), 3) -- cgit 1.2.3-korg