~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-06 20:10:34 UTC
  • mfrom: (13851.2.3 ubuntu-font-787798)
  • Revision ID: launchpad@pqm.canonical.com-20110906201034-f56n10lcb3fzr5np
[r=bac][ui=sinzui][bug=787798] Use Google Web Fonts so Launchpad
        always displays in Ubuntu font

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
from lp.code.model.diff import (
163
163
    Diff,
164
164
    PreviewDiff,
165
 
    StaticDiff,
166
165
    )
167
166
from lp.code.model.recipebuild import RecipeBuildRecord
168
167
from lp.codehosting.codeimport.worker import CodeImportSourceDetails
1557
1556
        return merge_proposal.generateIncrementalDiff(
1558
1557
            old_revision, new_revision, diff)
1559
1558
 
1560
 
    def makeStaticDiff(self):
1561
 
        return StaticDiff.acquireFromText(
1562
 
            self.getUniqueUnicode(), self.getUniqueUnicode(),
1563
 
            self.getUniqueString())
1564
 
 
1565
1559
    def makeRevision(self, author=None, revision_date=None, parent_ids=None,
1566
1560
                     rev_id=None, log_body=None, date_created=None):
1567
1561
        """Create a single `Revision`."""
3690
3684
                                           date_uploaded=UTC_NOW,
3691
3685
                                           scheduleddeletiondate=None,
3692
3686
                                           ancestor=None,
3693
 
                                           **kwargs
3694
 
                                           ):
 
3687
                                           **kwargs):
3695
3688
        """Make a `SourcePackagePublishingHistory`.
3696
3689
 
3697
3690
        :param sourcepackagerelease: The source package release to publish
4095
4088
                         emailaddress=u'test@canonical.com',
4096
4089
                         distroarchseries=None, private=False,
4097
4090
                         contactable=False, system=None,
4098
 
                         submission_data=None):
 
4091
                         submission_data=None, status=None):
4099
4092
        """Create a new HWSubmission."""
4100
4093
        if date_created is None:
4101
4094
            date_created = datetime.now(pytz.UTC)
4116
4109
        format = HWSubmissionFormat.VERSION_1
4117
4110
        submission_set = getUtility(IHWSubmissionSet)
4118
4111
 
4119
 
        return submission_set.createSubmission(
 
4112
        submission = submission_set.createSubmission(
4120
4113
            date_created, format, private, contactable,
4121
4114
            submission_key, emailaddress, distroarchseries,
4122
4115
            raw_submission, filename, filesize, system)
4123
4116
 
 
4117
        if status is not None:
 
4118
            removeSecurityProxy(submission).status = status
 
4119
        return submission
 
4120
 
4124
4121
    def makeHWSubmissionDevice(self, submission, device, driver, parent,
4125
4122
                               hal_device_id):
4126
4123
        """Create a new HWSubmissionDevice."""