~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

Merged db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
    )
85
85
from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
86
86
from lp.testing import (
87
 
    person_logged_in,
88
87
    StormStatementRecorder,
89
88
    TestCaseWithFactory,
90
89
    )
1348
1347
            bin_i386.component, bin_i386, copied_bin_i386)
1349
1348
        self.assertComponentSectionAndPriority(
1350
1349
            bin_hppa.component, bin_hppa, copied_bin_hppa)
1351
 
        
 
1350
 
1352
1351
    def test_existing_publication_no_overrides(self):
1353
1352
        # When we copy source/binaries into a PPA, we don't respect their
1354
1353
        # component and section.
1485
1484
            send_email=False)
1486
1485
        self.assertEquals([], pop_notifications())
1487
1486
 
 
1487
    def test_copying_unsupported_arch_with_override(self):
 
1488
        # When the copier is passed an unsupported arch with an override
 
1489
        # on the destination series, no binary is copied.
 
1490
        archive = self.factory.makeArchive(
 
1491
            distribution=self.test_publisher.ubuntutest, virtualized=False)
 
1492
        source = self.test_publisher.getPubSource(
 
1493
            archive=archive, architecturehintlist='all')
 
1494
        self.test_publisher.getPubBinaries(pub_source=source)
 
1495
 
 
1496
        # Now make a new distroseries with only one architecture:
 
1497
        # 'hppa'.
 
1498
        nobby = self.createNobby(('hppa', ))
 
1499
 
 
1500
        # Copy the package with binaries.
 
1501
        target_archive = self.factory.makeArchive(
 
1502
            purpose=ArchivePurpose.PRIMARY,
 
1503
            distribution=self.test_publisher.ubuntutest, virtualized=False)
 
1504
        copies = _do_direct_copy(source, target_archive, nobby, source.pocket,
 
1505
            include_binaries=True, close_bugs=False, create_dsd_job=False)
 
1506
 
 
1507
        # Only the source package has been copied.
 
1508
        self.assertEqual(1, len(copies))
 
1509
 
1488
1510
 
1489
1511
class TestDoDelayedCopy(TestCaseWithFactory, BaseDoCopyTests):
1490
1512