~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/tests/helpers.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-15 13:18:37 UTC
  • mfrom: (13662.5.6 push-creates-package)
  • Revision ID: launchpad@pqm.canonical.com-20110815131837-cp2nb9wc52fswn67
[r=adeuring][bug=386596] Push creates source package names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
__metaclass__ = type
7
7
__all__ = [
8
8
    'add_revision_to_branch',
 
9
    'get_non_existant_source_package_branch_unique_name',
9
10
    'make_erics_fooix_project',
10
11
    'make_linked_package_branch',
11
12
    'make_merge_proposal_without_reviewers',
313
314
    for vote in proposal.votes:
314
315
        removeSecurityProxy(vote).destroySelf()
315
316
    return proposal
 
317
 
 
318
 
 
319
def get_non_existant_source_package_branch_unique_name(owner, factory):
 
320
    """Return the unique name for a non-existanct source package branch.
 
321
 
 
322
    Neither the branch nor the source package name will exist.
 
323
    """
 
324
    distroseries = factory.makeDistroSeries()
 
325
    source_package = factory.getUniqueString('source-package')
 
326
    branch = factory.getUniqueString('branch')
 
327
    return '~%s/%s/%s/%s/%s' % (
 
328
        owner, distroseries.distribution.name, distroseries.name,
 
329
        source_package, branch)