'Test delete snapshot.'

@mock.patch('cinder.volume.drivers.qnap.QnapAPIExecutor')
def test_delete_snapshot_positive(self, mock_api_executor):

    fake_volume = VolumeClass('fakeDisplayName', 'fakeId', 100, 'fakeLunName')
    fake_snapshot = SnapshotClass(fake_volume, 100)
    mock_api_executor.return_value.get_basic_info.return_value = ('ES1640dc    ', 'ES1640dc    ', '1.1.3')
    mock_api_executor.return_value.api_delete_snapshot.return_value = None
    self.driver = qnap.QnapISCSIDriver(configuration=create_configuration('admin', 'qnapadmin', 'http://1.2.3.4:8080', '1.2.3.4', 'Pool1', True))
    self.driver.do_setup('context')
    self.driver.delete_snapshot(fake_snapshot)
    mock_api_return = mock_api_executor.return_value
    mock_api_return.api_delete_snapshot.assert_called_once_with('fakeSnapshotId')
