Code review comment for lp:~sinzui/launchpad/milestone-table-bug-490648

Revision history for this message
Gavin Panella (allenap) wrote :

On Wed, 02 Dec 2009 15:18:13 -0000
Curtis Hovey <email address hidden> wrote:

...
> > Should there also be a test to show that the
> > MilestoneInlineNavigationMenu is chosen for MilestoneView, or is that
> > going too far?
>
> Yes, I think there should given that I botched the ZCML registration the
> first time.
>

Cool, and it looks good.

> === modified file 'lib/lp/registry/browser/tests/milestone-views.txt'
> --- lib/lp/registry/browser/tests/milestone-views.txt 2009-12-01 18:31:10 +0000
> +++ lib/lp/registry/browser/tests/milestone-views.txt 2009-12-02 15:14:33 +0000
> @@ -34,6 +34,15 @@
> >>> check_menu_links(MilestoneInlineNavigationMenu(milestone))
> True
>
> +The MilestoneView used can be adapted to a MilestoneInlineNavigationMenu
> +for use with inline presentation of milestones.
> +
> + >>> from canonical.lazr.canonicalurl import nearest_adapter
> + >>> from canonical.launchpad.webapp.interfaces import INavigationMenu
> +
> + >>> view = create_view(milestone, name='+productseries-table-row')
> + >>> nearest_adapter(view, INavigationMenu, name='overview')
> + <lp.registry.browser.milestone.MilestoneInlineNavigationMenu ...>
>
> The MilestoneView provides access to the milestone and to its release if
> it has one.

« Back to merge proposal