~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-29 19:28:47 UTC
  • mfrom: (13765.2.1 bug-820055)
  • Revision ID: launchpad@pqm.canonical.com-20110829192847-cxd2l3dkmkhvre0h
[r=bac][bug=820055] don't error out if a permission is removed that
        was already removed

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
from lp.soyuz.interfaces.packagecopyjob import IPlainPackageCopyJobSource
78
78
from lp.soyuz.interfaces.processor import IProcessorFamilySet
79
79
from lp.soyuz.model.archive import Archive
80
 
from lp.soyuz.model.archivepermission import ArchivePermission
 
80
from lp.soyuz.model.archivepermission import (
 
81
    ArchivePermission,
 
82
    ArchivePermissionSet,
 
83
    )
81
84
from lp.soyuz.model.binarypackagerelease import (
82
85
    BinaryPackageReleaseDownloadCount,
83
86
    )
2269
2272
            target_archive.copyPackages, [source_name], source_archive,
2270
2273
            to_pocket.name, to_series=to_series.name, include_binaries=False,
2271
2274
            person=person)
 
2275
 
 
2276
 
 
2277
class TestRemovingPermissions(TestCaseWithFactory):
 
2278
 
 
2279
    layer = DatabaseFunctionalLayer
 
2280
 
 
2281
    def test_remove_permission_is_none(self):
 
2282
        # Several API functions remove permissions if they are not already
 
2283
        # removed.  This verifies that the underlying utility function does
 
2284
        # not generate an error if the permission is None.
 
2285
        ap_set = ArchivePermissionSet()
 
2286
        ap_set._remove_permission(None)