~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/factory.py

  • Committer: Ian Booth
  • Date: 2010-11-01 12:35:07 UTC
  • mto: This revision was merged to the branch mainline in revision 11934.
  • Revision ID: ian.booth@canonical.com-20101101123507-bqn9wiuj07avll7z
Finish view and add unit tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    )
38
38
import os
39
39
from random import randint
40
 
import simplejson
41
40
from StringIO import StringIO
42
41
from textwrap import dedent
43
42
from threading import local
47
46
from bzrlib.merge_directive import MergeDirective2
48
47
from bzrlib.plugins.builder.recipe import BaseRecipeBranch
49
48
import pytz
 
49
import simplejson
50
50
from twisted.python.util import mergeFunctionMetadata
51
51
from zope.component import (
52
52
    ComponentLookupError,
1098
1098
        return namespace.createBranch(branch_type, name, creator)
1099
1099
 
1100
1100
    def makeBranchMergeQueue(self, registrant=None, owner=None, name=None,
1101
 
                             description=None, configuration=None):
 
1101
                             description=None, configuration=None,
 
1102
                             branches=None):
1102
1103
        """Create a BranchMergeQueue."""
1103
1104
        if name is None:
1104
1105
            name = unicode(self.getUniqueString('queue'))
1113
1114
                self.getUniqueString('key'): self.getUniqueString('value')}))
1114
1115
 
1115
1116
        queue = getUtility(IBranchMergeQueueSource).new(
1116
 
            name, owner, registrant, description, configuration)
 
1117
            name, owner, registrant, description, configuration, branches)
1117
1118
        return queue
1118
1119
 
1119
1120
    def enableDefaultStackingForProduct(self, product, branch=None):