diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 11:34:03 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 11:34:03 +0800 |
commit | 09e41a54625caa2f713798e869e5e1e5a31c0d58 (patch) | |
tree | 228f8f0b945f660fddeccac036876ef0196f7980 | |
parent | 0978a4023edea25dc89e0557e3044c2e72b7fe4e (diff) |
Add test_get_hpa_pci
Add test_get_hpa_pci
Change-Id: Ie732988d47d2a024e0a8d4195ca25a6bae94a1de
Issue-ID: MULTICLOUD-199
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r-- | vio/vio/tests/test_aai_client.py | 8 |
1 files changed, 8 insertions, 0 deletions
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"])) |