~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/scripts/tests/test_populatearchive.py

  • Committer: Francis J. Lacoste
  • Date: 2011-07-07 14:00:10 UTC
  • mto: This revision was merged to the branch mainline in revision 13427.
  • Revision ID: francis.lacoste@canonical.com-20110707140010-i7df8tztmzsfzxxc
Remove --raise-priority option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    )
27
27
from lp.soyuz.enums import PackagePublishingStatus
28
28
from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
29
 
from lp.soyuz.interfaces.buildpackagejob import COPY_ARCHIVE_SCORE_PENALTY
30
29
from lp.soyuz.scripts.ftpmaster import (
31
30
    PackageLocationError,
32
31
    SoyuzScriptError,
702
701
        # Make sure the source to be copied are the ones we expect (this
703
702
        # should break in case of a sample data change/corruption).
704
703
        self.assertEqual(src_names, self.expected_src_names)
705
 
 
706
 
    def testRaisePriority(self):
707
 
        # The --raise-priority option should create a copy archive
708
 
        # with a relative_build_score of 10 to offset the -10 of copy
709
 
        # archives.
710
 
        series = self.factory.makeDistroSeries()
711
 
        archive_name = self.factory.getUniqueString('copy-archive')
712
 
        script = self.getScript([
713
 
            '--from-distribution', series.distribution.name,
714
 
            '--from-suite', series.name,
715
 
            '--to-distribution', series.distribution.name,
716
 
            '--to-suite', series.name,
717
 
            '--to-archive', archive_name,
718
 
            '--to-user', series.registrant.name,
719
 
            '--reason', 'testing!',
720
 
            '--architecture', '386',
721
 
            '--raise-priority'])
722
 
        script.mainTask()
723
 
 
724
 
        copy_archive = getUtility(IArchiveSet).getByDistroPurpose(
725
 
            series.distribution, ArchivePurpose.COPY, archive_name)
726
 
        self.assertIsNotNone(copy_archive, "COPY archive wasn't created")
727
 
        self.assertEquals(
728
 
            COPY_ARCHIVE_SCORE_PENALTY, copy_archive.relative_build_score)