~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/tests/test_archive.py

  • Committer: Julian Edwards
  • Date: 2011-07-13 15:41:10 UTC
  • mto: This revision was merged to the branch mainline in revision 13459.
  • Revision ID: julian.edwards@canonical.com-20110713154110-u2mmtuliyjjap13k
Add test showing non-release pocket copies in PPAs are disallowed immediately.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2016
2016
        (source, source_archive, source_name, target_archive, to_pocket,
2017
2017
         to_series, version) = self._setup_copy_data()
2018
2018
        person = self.factory.makePerson()
2019
 
        self.assertRaises(
2020
 
            CannotCopy,
2021
 
            target_archive.copyPackage, source_name, version, source_archive,
2022
 
            to_pocket, to_series=to_series, include_binaries=False,
2023
 
            person=person)
 
 
b'\\ No newline at end of file'
 
2019
        self.assertTrue(target_archive.is_ppa)
 
2020
        self.assertRaises(
 
2021
            CannotCopy,
 
2022
            target_archive.copyPackage, source_name, version, source_archive,
 
2023
            to_pocket, to_series=to_series, include_binaries=False,
 
2024
            person=person)
 
2025
 
 
2026
    def test_copyPackage_disallows_non_release_target_pocket_for_PPA(self):
 
2027
        (source, source_archive, source_name, target_archive, to_pocket,
 
2028
         to_series, version) = self._setup_copy_data()
 
2029
        to_pocket = PackagePublishingPocket.UPDATES
 
2030
        self.assertTrue(target_archive.is_ppa)
 
2031
        self.assertRaises(
 
2032
            CannotCopy,
 
2033
            target_archive.copyPackage, source_name, version, source_archive,
 
2034
            to_pocket, to_series=to_series, include_binaries=False,
 
2035
            person=target_archive.owner)
 
2036