Fix unit test problem:'spawn_vm.py does not have attribute FetchImg' 77/22777/1
authorzhifeng.jiang <jiang.zhifeng@zte.com.cn>
Fri, 7 Oct 2016 08:21:28 +0000 (16:21 +0800)
committerzhifeng.jiang <jiang.zhifeng@zte.com.cn>
Fri, 7 Oct 2016 08:22:37 +0000 (16:22 +0800)
Change-Id: I8035abfeb52515f106de4188621c207acfe54a65
Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
tests/spawn_vm_test.py

index b22745d..0ec5c90 100644 (file)
@@ -43,13 +43,12 @@ class TestClass:
          [('172.10.0.154', '')]),
     ])
     @mock.patch('func.spawn_vm.Env_setup')
-    @mock.patch('func.spawn_vm.FetchImg')
     @mock.patch('func.spawn_vm.create_zones')
     @mock.patch('func.spawn_vm.client', autospec=True)
     @mock.patch('func.spawn_vm.keystoneclient.v2_0', autospec=True)
     @mock.patch('func.spawn_vm.heatclient.client', autospec=True)
     def test_create_zones_success(self, mock_heat, mock_keystone,
-                                  mock_nova_client, mock_zone, mock_fetch,
+                                  mock_nova_client, mock_zone,
                                   mock_setup, test_input, expected):
         mock_nova_client.Client.return_value = Mock()
         mock_heat.Client.return_value = Mock(stacks=HeatMock())