~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Julian Edwards
  • Date: 2010-08-26 15:28:34 UTC
  • mfrom: (11450 launchpad)
  • mto: This revision was merged to the branch mainline in revision 11453.
  • Revision ID: julian.edwards@canonical.com-20100826152834-p16tp6o6v2qg3hgu
merge devel

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    getPolicy,
31
31
    mock_logger_quiet,
32
32
    )
 
33
from lp.archiveuploader.uploadpolicy import ArchiveUploadType
33
34
from lp.registry.interfaces.distribution import IDistributionSet
34
35
from lp.soyuz.interfaces.component import IComponentSet
35
36
 
52
53
def getUploadForBinary(upload_path):
53
54
    """Return a NascentUpload object for binaries."""
54
55
    policy = getPolicy(name='sync', distro='ubuntu', distroseries='hoary')
55
 
    policy.can_upload_binaries = True
 
56
    policy.accepted_type = ArchiveUploadType.BINARY_ONLY
56
57
    return NascentUpload.from_changesfile_path(
57
58
        datadir(upload_path), policy, mock_logger_quiet)
58
59