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)
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)
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)
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)