2
# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-
4
# This file is part of Déjà Dup.
5
# For copyright information, see AUTHORS.
7
# Déjà Dup is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
12
# Déjà Dup is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
# General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with Déjà Dup. If not, see <http://www.gnu.org/licenses/>.
22
sys.path.insert(0, sys.path[0]+'/..')
26
# Bug 582720: "GPG EOFError during restore"
29
restoredir = base.get_temp_name('restore')
30
base.setup(root_prompt=True)
31
base.restore_simple(restoredir, backend='file', dest=(sys.path[0]+'/vols/home'))
32
assert base.file_equals(restoredir+os.environ['HOME']+'/test', 'test\n')