Beispiel #1
0
 def test__create_volume_good(self, mock_get_client, mock_get_pools):
     pools = [self.Pool(1), self.Pool(6), self.Pool(5)]
     mock_seamicro_volumes = mock.MagicMock(spec_set=['create'])
     mock_get_client.return_value = mock.MagicMock(
         volumes=mock_seamicro_volumes, spec_set=['volumes'])
     mock_get_pools.return_value = pools
     seamicro._create_volume(self.info, 2)
 def test__create_volume_good(self, mock_get_client, mock_get_pools):
     pools = [self.Pool(1), self.Pool(6), self.Pool(5)]
     mock_seamicro_volumes = mock.MagicMock(spec_set=['create'])
     mock_get_client.return_value = mock.MagicMock(
         volumes=mock_seamicro_volumes, spec_set=['volumes'])
     mock_get_pools.return_value = pools
     seamicro._create_volume(self.info, 2)
Beispiel #3
0
 def test__create_volume_good(self, mock_get_client, mock_get_pools):
     pools = [self.Pool(1), self.Pool(6), self.Pool(5)]
     get_pools_patcher = mock.patch.object(mock_get_client, "volume.create")
     get_pools_patcher.start()
     mock_get_pools.return_value = pools
     seamicro._create_volume(self.info, 2)
     get_pools_patcher.stop()
Beispiel #4
0
 def test__create_volume_good(self, mock_get_client, mock_get_pools):
     pools = [self.Pool(1), self.Pool(6), self.Pool(5)]
     get_pools_patcher = mock.patch.object(mock_get_client, "volume.create")
     get_pools_patcher.start()
     mock_get_pools.return_value = pools
     seamicro._create_volume(self.info, 2)
     get_pools_patcher.stop()