diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 10:38:04 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 10:38:04 +0800 |
commit | 5de1216655e1da0a4ee7474288d7bc1ce77d05bc (patch) | |
tree | abb47ecf3d1ea86bf489af7870821170b5c7a205 /vio | |
parent | b0a8f3d8b611f96404850a1baf31a1d63dfbc49d (diff) |
Add test_update_vim
Add test_update_vim
Change-Id: Ia6258d32332785fe0c4efa54f5a72758ebde8d86
Issue-ID: MULTICLOUD-199
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio/tests/test_aai_client.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py index 3e1f515..08d8a3b 100644 --- a/vio/vio/tests/test_aai_client.py +++ b/vio/vio/tests/test_aai_client.py @@ -189,3 +189,20 @@ class TestAAIClient(unittest.TestCase): self.view.get_vim.return_value = resp mock_call.return_value = [1, "", "", ""] self.assertRaises(VimDriverVioException, self.view.delete_vim) + + @mock.patch.object(restcall, "call_req") + def test_update_vim(self, mock_call): + resp = { + "resource-version": "1" + } + self.view.get_vim = mock.MagicMock() + self.view.get_vim.return_value = resp + content = { + "tenants": [], + "images": [], + "flavors": [], + "networks": [], + "hypervisors": [] + } + self.view.update_vim(content) + mock_call.assert_called_once() |