From 09e41a54625caa2f713798e869e5e1e5a31c0d58 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Wed, 13 Jun 2018 11:34:03 +0800 Subject: Add test_get_hpa_pci Add test_get_hpa_pci Change-Id: Ie732988d47d2a024e0a8d4195ca25a6bae94a1de 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 1381a3f..17a0047 100644 --- a/vio/vio/tests/test_aai_client.py +++ b/vio/vio/tests/test_aai_client.py @@ -357,3 +357,11 @@ class TestAAIClient(unittest.TestCase): } ret = self.view._get_instruction_set_capabilities(extra) self.assertEqual(1, len(ret["hpa-feature-attributes"])) + + @mock.patch.object(restcall, "call_req") + def test_get_hpa_pci(self, mock_call): + extra = { + "pci_passthrough:alias": "gpu-nvidia-x86-0011-0022:1", + } + ret = self.view._get_pci_passthrough_capabilities(extra) + self.assertEqual(3, len(ret["hpa-feature-attributes"])) -- cgit 1.2.3-korg