> === modified file 'lib/lp/registry/browser/tests/sourcepackage-views.txt' > --- lib/lp/registry/browser/tests/sourcepackage-views.txt 2010-02-11 19:55:34 +0000 > +++ lib/lp/registry/browser/tests/sourcepackage-views.txt 2010-02-11 23:29:36 +0000 ... > +So let's set the product series so we can do more interesting testing. > + > + >>> login_person(product.owner) > + >>> form = { > + ... 'field.productseries': 'stinky/stinkyseries', > + ... 'field.actions.change': 'Change', > + ... } > + >>> view = create_initialized_view( > + ... package, name='+edit-packaging', form=form, > + ... principal=product.owner) > + >>> view.errors > + [] > + >>> print package.productseries.name > + stinkyseries This is duplicating a test from packaging-views and will break if we change that form. Just create a packaging link so that we can focus on the property. package.setPackaging(productseries, product.owner) > +If a product is not part of a project group and its bug tracker is not > +set then the view property is false. > + > + >>> view = create_initialized_view(package, name='+portlet-associations') > + > + >>> print product.official_malone > + False > + >>> print product.bugtracker > + None > + >>> print view.has_bugtracker > + False > + > +Having official_malone set results in has_bugtracker being true. > + > + >>> product.official_malone = True > + >>> print view.has_bugtracker > + True > + > +Having a bug_tracker set also results in has_bugtracker being true (a > +bit of a tautology you'd think). > + > + >>> product.official_malone = False > + >>> from zope.component import getUtility > + >>> from canonical.launchpad.interfaces import IBugTrackerSet > + >>> product.bugtracker = getUtility(IBugTrackerSet)['mozilla.org'] > + >>> print view.has_bugtracker > + True This is easier. Graham got tired of looking up trackers in his tests. product.bugtracker = factory.makeBugTracker() ... > === modified file 'lib/lp/registry/templates/sourcepackage-portlet-associations.pt' > --- lib/lp/registry/templates/sourcepackage-portlet-associations.pt 2010-02-11 19:55:34 +0000 > +++ lib/lp/registry/templates/sourcepackage-portlet-associations.pt 2010-02-11 22:12:10 +0000 > @@ -48,16 +48,30 @@ > use-macro="context/@@+base-layout-macros/yes-no" /> > > +
+ tal:condition="context/getTranslationTemplates" > + tal:define="bool not:series/translations_autoimport_mode/enumvalue:NO_IMPORT"> > + Translations: > + + use-macro="context/@@+base-layout-macros/yes-no" /> > +
> > > > >