Пример #1
0
 def test_listrpms(self):
     srcdir = self.repo.srcdir
     actual = mrepo.listrpms(srcdir)
     pj = os.path.join
     target = [
         ('0.rpm', srcdir),
         ('1.rpm', srcdir),
         ('2.rpm', srcdir),
         ('2.rpm', pj(srcdir, 'a')),
         ('3.rpm', srcdir),
         ('a.rpm', pj(srcdir, 'a')),
     ]
     self.assertEqual(actual, target)
Пример #2
0
 def test_listrpms(self):
     srcdir = self.repo.srcdir
     actual = mrepo.listrpms(srcdir)
     pj= os.path.join
     target = [
         ('0.rpm', srcdir),
         ('1.rpm', srcdir),
         ('2.rpm', srcdir),
         ('2.rpm', pj(srcdir, 'a')),
         ('3.rpm', srcdir),
         ('a.rpm', pj(srcdir, 'a')),
         ]
     self.assertEqual(actual, target)
Пример #3
0
 def test_listrpms_rel(self):
     srcdir = self.repo.srcdir
     linkbase = self.linkbase
     actual = mrepo.listrpms(srcdir, relative=self.repo.wwwdir)
     pj = os.path.join
     target = [
         ('0.rpm', linkbase),
         ('1.rpm', linkbase),
         ('2.rpm', linkbase),
         ('2.rpm', pj(linkbase, 'a')),
         ('3.rpm', linkbase),
         ('a.rpm', pj(linkbase, 'a')),
     ]
     self.assertEqual(actual, target)
Пример #4
0
 def test_listrpms_rel(self):
     srcdir = self.repo.srcdir
     linkbase = self.linkbase
     actual = mrepo.listrpms(srcdir, relative = self.repo.wwwdir)
     pj= os.path.join
     target = [
         ('0.rpm', linkbase),
         ('1.rpm', linkbase),
         ('2.rpm', linkbase),
         ('2.rpm', pj(linkbase, 'a')),
         ('3.rpm', linkbase),
         ('a.rpm', pj(linkbase, 'a')),
         ]
     self.assertEqual(actual, target)