diff options
| author | Sebastian Heinlein <devel@glatzor.de> | 2012-06-06 12:53:44 +0200 |
|---|---|---|
| committer | Sebastian Heinlein <devel@glatzor.de> | 2012-06-06 12:53:44 +0200 |
| commit | 6f8b10fe939609a1afc8de057813e1d43bc47558 (patch) | |
| tree | a53b845ffb6c02984824cd19e9837338e7f060c7 | |
| parent | b1d3ecfe422383a641512779fdb0084b397fd7e6 (diff) | |
| download | python-apt-6f8b10fe939609a1afc8de057813e1d43bc47558.tar.gz | |
Add a fakeroot wrapper for apt-key
| -rwxr-xr-x | tests/fakeroot-apt-key | 2 | ||||
| -rw-r--r-- | tests/test_auth.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/fakeroot-apt-key b/tests/fakeroot-apt-key new file mode 100755 index 00000000..7be99711 --- /dev/null +++ b/tests/fakeroot-apt-key @@ -0,0 +1,2 @@ +#!/bin/sh +fakeroot /usr/bin/apt-key $* diff --git a/tests/test_auth.py b/tests/test_auth.py index 6965dfed..fc37830d 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -119,12 +119,14 @@ class TestAuthKeys(unittest.TestCase): self.tmpdir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.tmpdir) apt_pkg.config.set("Dir", self.tmpdir) + apt_pkg.config.set("Dir::Bin::Apt-key", "fakeroot-apt-key") apt_pkg.config.set("Dir::Etc", "etc/apt/") trustedparts_dir = apt_pkg.config.find_dir("Dir::Etc::Trustedparts") confparts_dir = apt_pkg.config.find_dir("Dir::Etc::parts") self.assertTrue(trustedparts_dir.startswith(self.tmpdir)) os.makedirs(trustedparts_dir) os.makedirs(confparts_dir) + shutil.copy("fakeroot-apt-key", self.tmpdir) def _restore_apt_config(self, cnf): """Restore previous apt configuration.""" |
