'Test normal backup deletion.'

def test_delete_backup(self):

    vol_id = self._create_volume_db_entry(size=1)
    backup = self._create_backup_db_entry(status=fields.BackupStatus.DELETING, volume_id=vol_id)
    self.backup_mgr.delete_backup(self.ctxt, backup)
    self.assertRaises(exception.BackupNotFound, db.backup_get, self.ctxt, backup.id)
    ctxt_read_deleted = context.get_admin_context('yes')
    backup = db.backup_get(ctxt_read_deleted, backup.id)
    self.assertTrue(backup.deleted)
    self.assertGreaterEqual(timeutils.utcnow(), backup.deleted_at)
    self.assertEqual(fields.BackupStatus.DELETED, backup.status)
