'Test diff restore not allowed when volumes are same.
Detail conditions:
1. backup base is diff-format
2. restore point exists
3. destination volume is an rbd
4. source and destination volumes are the same'

@common_mocks
def test_diff_restore_allowed_with_same_volume(self):

    backup_base = 'backup.base'
    restore_point = 'backup.snap.1'
    rbd_io = self._get_wrapped_rbd_io(self.service.rbd.Image())
    args_vols_same = [backup_base, self.backup, self.volume, rbd_io, self.mock_rados]
    with mock.patch.object(self.service, '_rbd_image_exists') as mock_rbd_image_exists:
        mock_rbd_image_exists.return_value = (True, backup_base)
        with mock.patch.object(self.service, '_get_restore_point') as mock_get_restore_point:
            mock_get_restore_point.return_value = restore_point
            with mock.patch.object(self.service, '_file_is_rbd') as mock_file_is_rbd:
                mock_file_is_rbd.return_value = True
                resp = self.service._diff_restore_allowed(*args_vols_same)
                self.assertEqual((False, restore_point), resp)
                self.assertTrue(mock_rbd_image_exists.called)
                self.assertTrue(mock_get_restore_point.called)
                self.assertTrue(mock_file_is_rbd.called)
