class testAuthentication(unittest.TestCase):
-
+ """
+ test if the authentication is working, the repository
+ of the test-data can be found here:
+ bzr get http://people.ubuntu.com/~mvo/bzr/apt/apt-auth-test-suit/
+ """
+
# some class wide data
apt = "apt-get"
pkg = "libglib2.0-data"
call([self.apt,"update",
"-o","Dir::Etc::sourcelist=./%s" % f]+apt_args,
stdout=stdout, stderr=stderr)
- # then get the pkg
cmd = ["install", "-y", "-d", "--reinstall",
"%s=%s" % (self.pkg, self.pkgver),
"-o","Dir::state::Status=./fake-status"]
stdout=stdout, stderr=stderr)
self.assert_(res == expected_res,
"test '%s' failed (got %s expected %s" % (f,res,expected_res))
-
+ if expected_res == 0:
+ self.assert_(len(glob.glob("/var/lib/apt/lists/partial/*")) == 0,
+ "partial/ dir has leftover files: %s" % glob.glob("/var/lib/apt/lists/partial/*"))
class testLocalRepositories(unittest.TestCase):