Exemplo n.º 1
0
 def test_no_exist(self):
     pbuilder_cache = '/noexist/base-trusty-amd64.tgz'
     setup_pbuilder_cache(pbuilder_cache, 'trusty')
     expected = ['sudo', 'pbuilder', 'create', '--debootstrapopts',
                 '--variant=buildd', '--basetgz', pbuilder_cache,
                 '--distribution', 'trusty']
     assert self.cmds == [expected]
Exemplo n.º 2
0
 def test_zero_length(self, tmpcache):
     tmpcache.write('')
     pbuilder_cache = str(tmpcache)
     setup_pbuilder_cache(pbuilder_cache, 'trusty')
     rm = ['sudo', 'rm', pbuilder_cache]
     create = ['sudo', 'pbuilder', 'create', '--debootstrapopts',
               '--variant=buildd', '--basetgz', pbuilder_cache,
               '--distribution', 'trusty']
     assert self.cmds == [rm, create]
Exemplo n.º 3
0
 def test_exists(self, tmpcache):
     pbuilder_cache = str(tmpcache)
     setup_pbuilder_cache(pbuilder_cache, 'trusty')
     assert self.cmds == []
Exemplo n.º 4
0
 def test_exists(self, tmpcache):
     pbuilder_cache = str(tmpcache)
     setup_pbuilder_cache(pbuilder_cache, 'trusty')
     assert self.cmds == []