def test_put(self): distroconf = mediasys.config.MediasysConfig().get_any_distro() distroconf.recently_removed_dir = self.testrecentlyremoved_dir media = mediasys.media.MandrivaMedia(self.testrepomainrelease_dir, {}, distroconf) media.load() media.put([self.testpkgnew_path]) media.save() media = mediasys.media.MandrivaMedia(self.testrepomainrelease_dir, {}, distroconf) media.load() pkgs = media.packages_by_name["null-bar"] self.assertEquals(len(pkgs), 1) pkg = pkgs[0] self.assertEquals(pkg.fullversion, "1:2.2-34bog2011.0.i586", "newer package " "did not appear in repository metadata") self.assertEquals(len(media.packages), 10)
def test_save(self): distroconf = mediasys.config.MediasysConfig().get_any_distro() media = mediasys.media.MandrivaMedia(self.testrepocontribrelease_dir, {}, distroconf) media.load() media.save()