~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archiveuploader/tests/test_ppauploadprocessor.py

  • Committer: Gavin Panella
  • Date: 2010-08-19 15:54:17 UTC
  • mto: This revision was merged to the branch mainline in revision 11495.
  • Revision ID: gavin.panella@canonical.com-20100819155417-2z0arhw7ycjpnckh
Fix some failing tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 
65
65
        # create name16 PPA
66
66
        self.name16_ppa = getUtility(IArchiveSet).new(
67
 
            owner=self.name16, distribution=self.ubuntu,
 
67
            owner=removeSecurityProxy(self.name16), distribution=self.ubuntu,
68
68
            purpose=ArchivePurpose.PPA)
69
69
        # Extra setup for breezy and allowing PPA builds on breezy/i386.
70
70
        self.setupBreezy()
276
276
        """Test PPA uploads to a named PPA."""
277
277
        # Create a PPA named 'testing' for 'name16' user.
278
278
        other_ppa = getUtility(IArchiveSet).new(
279
 
            owner=self.name16, name='testing', distribution=self.ubuntu,
280
 
            purpose=ArchivePurpose.PPA)
 
279
            owner=removeSecurityProxy(self.name16), name='testing',
 
280
            distribution=self.ubuntu, purpose=ArchivePurpose.PPA)
281
281
 
282
282
        # Upload to a named PPA.
283
283
        upload_dir = self.queueUpload("bar_1.0-1", "~name16/testing/ubuntu")
549
549
        """
550
550
        ubuntu_team = getUtility(IPersonSet).getByName("ubuntu-team")
551
551
        getUtility(IArchiveSet).new(
552
 
            owner=ubuntu_team, distribution=self.ubuntu,
 
552
            owner=removeSecurityProxy(ubuntu_team), distribution=self.ubuntu,
553
553
            purpose=ArchivePurpose.PPA)
554
554
        self.layer.commit()
555
555
 
585
585
        ubuntu_translators = getUtility(IPersonSet).getByName(
586
586
            "ubuntu-translators")
587
587
        getUtility(IArchiveSet).new(
588
 
            owner=ubuntu_translators, distribution=self.ubuntu,
589
 
            purpose=ArchivePurpose.PPA)
 
588
            owner=removeSecurityProxy(ubuntu_translators),
 
589
            distribution=self.ubuntu, purpose=ArchivePurpose.PPA)
590
590
        self.layer.commit()
591
591
 
592
592
        upload_dir = self.queueUpload(
600
600
        """Upload to a someone else's PPA gets rejected."""
601
601
        kinnison = getUtility(IPersonSet).getByName("kinnison")
602
602
        getUtility(IArchiveSet).new(
603
 
            owner=kinnison, distribution=self.ubuntu,
 
603
            owner=removeSecurityProxy(kinnison), distribution=self.ubuntu,
604
604
            purpose=ArchivePurpose.PPA)
605
605
        self.layer.commit()
606
606