← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~stevenk/launchpad/fix-approximatedate into lp:launchpad

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/fix-approximatedate into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/fix-approximatedate/+merge/66794

Fix DSP's usage of branch.date_last_modified, and add a test, since none existed.
-- 
https://code.launchpad.net/~stevenk/launchpad/fix-approximatedate/+merge/66794
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/fix-approximatedate into lp:launchpad.
=== modified file 'lib/lp/code/browser/tests/test_branchlisting.py'
--- lib/lp/code/browser/tests/test_branchlisting.py	2011-06-30 21:41:50 +0000
+++ lib/lp/code/browser/tests/test_branchlisting.py	2011-07-04 13:53:23 +0000
@@ -340,6 +340,16 @@
         expected = official[:3] + branches
         self.assertGroupBranchesEqual(expected, series)
 
+    def test_distributionsourcepackage_branch(self):
+        source_package = self.factory.makeSourcePackage()
+        dsp = source_package.distribution.getSourcePackage(
+            source_package.sourcepackagename)
+        branch = self.factory.makeBranch(sourcepackage=source_package)
+        view = create_initialized_view(
+            dsp, name='+code-index', rootsite='code')
+        html = view()
+        self.assertIn(branch.name, html)
+
 
 class TestDevelopmentFocusPackageBranches(TestCaseWithFactory):
     """Make sure that the bzr_identity of the branches are correct."""

=== modified file 'lib/lp/code/templates/distributionsourcepackage-branches-grouped.pt'
--- lib/lp/code/templates/distributionsourcepackage-branches-grouped.pt	2011-06-30 15:36:20 +0000
+++ lib/lp/code/templates/distributionsourcepackage-branches-grouped.pt	2011-07-04 13:53:23 +0000
@@ -69,7 +69,7 @@
           </td>
           <td>
             <span tal:attributes="title branch/date_last_modified/fmt:datetime"
-                  tal:content="branch/date_last_updated/fmt:approximatedate">
+                  tal:content="branch/date_last_modified/fmt:approximatedate">
               sometime
               </span> ago
           </td>