'Test normal backup restoration with notifications.'

@mock.patch('cinder.volume.utils.notify_about_backup_usage')
def test_restore_backup_with_notify(self, notify):

    vol_size = 1
    vol_id = self._create_volume_db_entry(status='restoring-backup', size=vol_size)
    backup = self._create_backup_db_entry(status=fields.BackupStatus.RESTORING, volume_id=vol_id)
    self.backup_mgr._run_restore = mock.Mock()
    self.backup_mgr.restore_backup(self.ctxt, backup, vol_id)
    self.assertEqual(2, notify.call_count)
