11
sys.path.insert(0, "..")
12
from apt_clone import AptClone
14
class MockAptCache(apt.Cache):
15
def commit(self, fetchp, installp):
17
def update(self, fetchp):
20
class TestClone(unittest.TestCase):
24
print "Skipping because uid != 0"
26
target = "./tests/test-chroot"
27
if not os.path.exists(target):
29
subprocess.call(["debootstrap", "--arch=i386",
32
open(os.path.join(target, "etc/apt/apt.conf"), "w").write(
33
'APT::Architecture "i386";')
37
"./tests/data/apt-state_chroot_with_vim.tar.gz", target, "maverick")
39
if __name__ == "__main__":
40
logging.basicConfig(level=logging.DEBUG)