~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Henning Eggers
  • Date: 2011-08-17 11:58:06 UTC
  • mto: This revision was merged to the branch mainline in revision 13724.
  • Revision ID: henning@canonical.com-20110817115806-zivq43c1fux1ia9y
Removed more lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1443
1443
        nobby = self.createNobby(('i386', 'hppa'))
1444
1444
        getUtility(ISourcePackageFormatSelectionSet).add(
1445
1445
            nobby, SourcePackageFormat.FORMAT_1_0)
1446
 
        admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
1447
1446
        nobby.changeslist = 'nobby-changes@example.com'
1448
1447
        [copied_source] = do_copy(
1449
1448
            [source], archive, nobby, source.pocket, False,
1666
1665
            'foocomm', '0.9', component='multiverse',
1667
1666
            archive=self.copy_archive,
1668
1667
            status=PackagePublishingStatus.PUBLISHED)
1669
 
        ancestor_bins = self.test_publisher.getPubBinaries(
 
1668
        self.test_publisher.getPubBinaries(
1670
1669
            binaryname='foo-bin', archive=self.copy_archive,
1671
1670
            status=PackagePublishingStatus.PUBLISHED, pub_source=ancestor)
1672
1671
        self.layer.txn.commit()
2149
2148
        ppa_source = test_publisher.getPubSource(
2150
2149
            archive=cprov.archive, version='1.0', distroseries=hoary,
2151
2150
            status=PackagePublishingStatus.PUBLISHED)
2152
 
        ppa_binaries = test_publisher.getPubBinaries(
 
2151
        test_publisher.getPubBinaries(
2153
2152
            pub_source=ppa_source, distroseries=hoary,
2154
2153
            status=PackagePublishingStatus.PUBLISHED)
2155
2154
        # Commit to ensure librarian files are written.
2190
2189
            sourcename='boing', version='1.0',
2191
2190
            archive=cprov.archive, distroseries=hoary,
2192
2191
            status=PackagePublishingStatus.PENDING)
2193
 
        ppa_binaries = test_publisher.getPubBinaries(
 
2192
        test_publisher.getPubBinaries(
2194
2193
            pub_source=ppa_source, distroseries=hoary,
2195
2194
            status=PackagePublishingStatus.PENDING)
2196
2195
        # Commit to ensure librarian files are written.
2244
2243
            sourcename='boing', version='1.0', distroseries=warty,
2245
2244
            architecturehintlist=architecturehintlist,
2246
2245
            status=PackagePublishingStatus.PUBLISHED)
2247
 
        ppa_binaries = test_publisher.getPubBinaries(
 
2246
        test_publisher.getPubBinaries(
2248
2247
            pub_source=ppa_source, distroseries=warty,
2249
2248
            status=PackagePublishingStatus.PUBLISHED)
2250
2249
        # Commit to ensure librarian files are written.
2268
2267
        # end up in the new architecture.
2269
2268
        amd64_family = ProcessorFamily.selectOneBy(name='amd64')
2270
2269
        hoary = ubuntu.getSeries('hoary')
2271
 
        hoary_amd64 = hoary.newArch('amd64', amd64_family, True, hoary.owner)
 
2270
        hoary.newArch('amd64', amd64_family, True, hoary.owner)
2272
2271
 
2273
2272
        # Copy the source and binaries from warty to hoary.
2274
2273
        copy_helper = self.getCopier(
2826
2825
        ancestry_source = test_publisher.getPubSource(
2827
2826
            version='1.0', distroseries=warty,
2828
2827
            status=PackagePublishingStatus.PUBLISHED)
2829
 
        ancestry_binaries = test_publisher.getPubBinaries(
 
2828
        test_publisher.getPubBinaries(
2830
2829
            pub_source=ancestry_source, distroseries=warty,
2831
2830
            status=PackagePublishingStatus.SUPERSEDED)
2832
2831
 
2939
2938
                status=PackagePublishingStatus.PUBLISHED)
2940
2939
            source.sourcepackagerelease.changelog_entry = (
2941
2940
                "Required for close_bugs_for_sourcepublication")
2942
 
            binaries = test_publisher.getPubBinaries(
 
2941
            test_publisher.getPubBinaries(
2943
2942
                pub_source=source, distroseries=warty, archive=archive,
2944
2943
                pocket=pocket, status=PackagePublishingStatus.PUBLISHED)
2945
2944
            self.layer.txn.commit()
3030
3029
        # Copies to PPA do not close bugs.
3031
3030
        proposed_bug_id = create_bug('bug in PPA')
3032
3031
        closing_bug_changesfile = changes_template % proposed_bug_id
3033
 
        release_source = create_source(
 
3032
        create_source(
3034
3033
            '670', warty.main_archive, PackagePublishingPocket.RELEASE,
3035
3034
            closing_bug_changesfile)
3036
3035
 
3056
3055
        test_publisher = self.getTestPublisher(warty)
3057
3056
        test_publisher.addFakeChroots(warty)
3058
3057
 
3059
 
        orig_tarball = 'test-source_1.0.orig.tar.gz'
3060
3058
        proposed_source = test_publisher.getPubSource(
3061
3059
            sourcename='test-source', version='1.0-2',
3062
3060
            distroseries=warty, archive=warty.main_archive,
3063
3061
            pocket=PackagePublishingPocket.PROPOSED,
3064
3062
            status=PackagePublishingStatus.PUBLISHED,
3065
3063
            section='net')
3066
 
        updates_source = test_publisher.getPubSource(
 
3064
        test_publisher.getPubSource(
3067
3065
            sourcename='test-source', version='1.0-1',
3068
3066
            distroseries=warty, archive=warty.main_archive,
3069
3067
            pocket=PackagePublishingPocket.UPDATES,