@mock.patch.object(rest_client.KioxiaProvisioner, 'create_snapshot_volume')
def test_create_volume_from_snapshot_success(self, mock_create_snapshot_volume):
    testsnap = _stub_snapshot()
    testvol = _stub_volume()
    mock_create_snapshot_volume.return_value = success_prov_response
    result = self.driver.create_volume_from_snapshot(testvol, testsnap)
    (args, kwargs) = mock_create_snapshot_volume.call_args
    mock_call = args[0]
    self.assertEqual(mock_call.alias, testvol['name'])
    self.assertEqual(mock_call.volumeID, testsnap['volume_id'])
    self.assertEqual(mock_call.snapshotID, testsnap['id'])
    self.assertEqual(mock_call.protocol, VOL_PROTOCOL)
    self.assertIsNone(result)
@mock.patch.object(rest_client.KioxiaProvisioner, 'create_snapshot_volume')
def test_create_volume_from_snapshot_success(self, mock_create_snapshot_volume):
    testsnap = _stub_snapshot()
    testvol = _stub_volume()
    mock_create_snapshot_volume.return_value = success_prov_response
    result = self.driver.create_volume_from_snapshot(testvol, testsnap)
    (args, kwargs) = mock_create_snapshot_volume.call_args
    mock_call = args[0]
    self.assertEqual(mock_call.alias, testvol['name'])
    self.assertEqual(mock_call.volumeID, testsnap['volume_id'])
    self.assertEqual(mock_call.snapshotID, testsnap['id'])
    self.assertEqual(mock_call.protocol, VOL_PROTOCOL)
    self.assertIsNone(result)