~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archivepublisher/tests/test_publisher.py

  • Committer: Jeroen Vermeulen
  • Date: 2011-10-16 08:16:47 UTC
  • mto: This revision was merged to the branch mainline in revision 14165.
  • Revision ID: jeroen.vermeulen@canonical.com-20111016081647-nb3ab4mv9wwr68z2
Lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""Tests for publisher class."""
17
17
from textwrap import dedent
18
18
 
19
19
from debian.deb822 import Release
20
 
 
21
20
import transaction
22
21
from zope.component import getUtility
23
22
from zope.security.proxy import removeSecurityProxy
26
25
from canonical.database.constants import UTC_NOW
27
26
from canonical.launchpad.ftests.keys_for_tests import gpgkeysdir
28
27
from canonical.launchpad.interfaces.gpghandler import IGPGHandler
29
 
from lp.testing.keyserver import KeyServerTac
30
28
from lp.archivepublisher.config import getPubConfig
31
29
from lp.archivepublisher.diskpool import DiskPool
32
30
from lp.archivepublisher.interfaces.archivesigningkey import (
52
50
    BinaryPackageFormat,
53
51
    PackagePublishingStatus,
54
52
    )
55
 
from lp.soyuz.interfaces.archive import (
56
 
    IArchiveSet,
57
 
    )
 
53
from lp.soyuz.interfaces.archive import IArchiveSet
58
54
from lp.soyuz.tests.test_publishing import TestNativePublishingBase
 
55
from lp.testing.keyserver import KeyServerTac
59
56
 
60
57
 
61
58
RELEASE = PackagePublishingPocket.RELEASE
877
874
        archive_publisher.D_writeReleaseFiles(False)
878
875
 
879
876
        release = self.parseRelease(os.path.join(
880
 
            archive_publisher._config.distsroot, 'breezy-autotest', 'Release'))
 
877
            archive_publisher._config.distsroot, 'breezy-autotest',
 
878
            'Release'))
881
879
        self.assertEqual('LP-PPA-cprov', release['origin'])
882
880
 
883
881
        # The Label: field should be set to the archive displayname
925
923
        # Check the distinct Origin: field content in the main Release file
926
924
        # and the component specific one.
927
925
        release = self.parseRelease(os.path.join(
928
 
            archive_publisher._config.distsroot, 'breezy-autotest', 'Release'))
 
926
            archive_publisher._config.distsroot, 'breezy-autotest',
 
927
            'Release'))
929
928
        self.assertEqual('LP-PPA-cprov-testing', release['origin'])
930
929
 
931
930
        arch_release = self.parseRelease(os.path.join(