~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-08-31 17:40:09 UTC
  • mfrom: (13752.3.11 bug-comments-lazy-load)
  • Revision ID: launchpad@pqm.canonical.com-20110831174009-jxniqis4fzhnds6m
[r=jtv][bug=558642] Bug comments can now be loaded asynchronously for
        feature-flagged users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2291
2291
        return bmp.nominateReviewer(candidate, bmp.registrant)
2292
2292
 
2293
2293
    def makeMessage(self, subject=None, content=None, parent=None,
2294
 
                    owner=None):
 
2294
                    owner=None, datecreated=None):
2295
2295
        if subject is None:
2296
2296
            subject = self.getUniqueString()
2297
2297
        if content is None:
2298
2298
            content = self.getUniqueString()
2299
2299
        if owner is None:
2300
2300
            owner = self.makePerson()
 
2301
        if datecreated is None:
 
2302
            datecreated = datetime.now(UTC)
2301
2303
        rfc822msgid = self.makeUniqueRFC822MsgId()
2302
2304
        message = Message(rfc822msgid=rfc822msgid, subject=subject,
2303
 
            owner=owner, parent=parent)
 
2305
            owner=owner, parent=parent, datecreated=datecreated)
2304
2306
        MessageChunk(message=message, sequence=1, content=content)
2305
2307
        return message
2306
2308