~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

Merged disco into pgbouncer-fixture.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3690
3690
                                           date_uploaded=UTC_NOW,
3691
3691
                                           scheduleddeletiondate=None,
3692
3692
                                           ancestor=None,
3693
 
                                           **kwargs
3694
 
                                           ):
 
3693
                                           **kwargs):
3695
3694
        """Make a `SourcePackagePublishingHistory`.
3696
3695
 
3697
3696
        :param sourcepackagerelease: The source package release to publish
4095
4094
                         emailaddress=u'test@canonical.com',
4096
4095
                         distroarchseries=None, private=False,
4097
4096
                         contactable=False, system=None,
4098
 
                         submission_data=None):
 
4097
                         submission_data=None, status=None):
4099
4098
        """Create a new HWSubmission."""
4100
4099
        if date_created is None:
4101
4100
            date_created = datetime.now(pytz.UTC)
4116
4115
        format = HWSubmissionFormat.VERSION_1
4117
4116
        submission_set = getUtility(IHWSubmissionSet)
4118
4117
 
4119
 
        return submission_set.createSubmission(
 
4118
        submission = submission_set.createSubmission(
4120
4119
            date_created, format, private, contactable,
4121
4120
            submission_key, emailaddress, distroarchseries,
4122
4121
            raw_submission, filename, filesize, system)
4123
4122
 
 
4123
        if status is not None:
 
4124
            removeSecurityProxy(submission).status = status
 
4125
        return submission
 
4126
 
4124
4127
    def makeHWSubmissionDevice(self, submission, device, driver, parent,
4125
4128
                               hal_device_id):
4126
4129
        """Create a new HWSubmissionDevice."""