← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:testfix-stormify-bugnotification into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:testfix-stormify-bugnotification into launchpad:master.

Commit message:
Fix milestone.txt test failure

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/385675

I made a mistake while converting BugNotification to Storm: unlike [-1] in SQLObject, Storm's last() method checks that the result set is ordered.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:testfix-stormify-bugnotification into launchpad:master.
diff --git a/lib/lp/registry/doc/milestone.txt b/lib/lp/registry/doc/milestone.txt
index 5e4b086..b413da9 100644
--- a/lib/lp/registry/doc/milestone.txt
+++ b/lib/lp/registry/doc/milestone.txt
@@ -354,7 +354,7 @@ list of recipients.
 
     >>> from lp.services.database.interfaces import IStore
     >>> notification = IStore(BugNotification).find(
-    ...     BugNotification, date_emailed=None).last()
+    ...     BugNotification, date_emailed=None).order_by('id').last()
     >>> print notification.message.chunks[0].content
     ** Changed in: firefox
         Milestone: 1.0 => 2.0