-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 16.09.2009 10:05, Данило Шеган schrieb: > === modified file 'lib/lp/translations/browser/potemplate.py' All good [...] > === modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py' > --- lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-11 10:38:49 +0000 > +++ lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-16 06:17:21 +0000 > @@ -7,6 +7,8 @@ > > from zope.component import getUtility > > +from canonical.lazr.utils import smartquote > + > from canonical.launchpad.webapp.publisher import canonical_url > from canonical.launchpad.webapp.tests.breadcrumbs import ( > BaseBreadcrumbTestCase) > @@ -158,5 +160,20 @@ > ["Crumb Tester", "Series test", "Translations", "Serbian (sr)"]) > > > -def test_suite(): > - return unittest.TestLoader().loadTestsFromName(__name__) Huh? Is test_suite obsolete now? Or is this a mistake? > +class TestPOTemplateBreadcrumbs(BaseTranslationsBreadcrumbTestCase): > + def test_potemplate(self): > + product = self.factory.makeProduct( > + name='crumb-tester', displayname="Crumb Tester") > + series = self.factory.makeProductSeries( > + name="test", product=product) > + potemplate = self.factory.makePOTemplate(name="template", > + productseries=series) > + self._testContextBreadcrumbs( > + [product, series, potemplate], > + ["http://launchpad.dev/crumb-tester", > + "http://launchpad.dev/crumb-tester/test", > + "http://translations.launchpad.dev/crumb-tester/test", > + "http://translations.launchpad.dev/crumb-tester/test" > + "/+pots/template"], > + ["Crumb Tester", "Series test", "Translations", > + smartquote('Template "template"')]) > > === modified file 'lib/lp/translations/configure.zcml' Good. [...] > === modified file 'lib/lp/translations/doc/canonical_url_examples.txt' Good, too. [...] > === modified file 'lib/lp/translations/stories/navigation-links/potemplate.txt' Good, three. ;) [...] > === modified file 'lib/lp/translations/stories/standalone/xx-person-activity.txt' Good 4 u. [...] > === modified file 'lib/lp/translations/stories/standalone/xx-pofile-index.txt' Good. High 5! [...] > === modified file 'lib/lp/translations/stories/standalone/xx-potemplate-edit.txt' Got a 'Good' six pack. [...] > === modified file 'lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt' 7th Good heavens! [...] > === modified file 'lib/lp/translations/stories/standalone/xx-rosetta-potemplate-export.txt' I 8 the Good. [...] > === modified file 'lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt' > --- lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt 2009-07-01 20:45:39 +0000 > +++ lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt 2009-09-16 06:17:21 +0000 > @@ -7,16 +7,14 @@ > >>> anon_browser.open("http://translations.launchpad.dev/" > ... "ubuntu/hoary/+source/evolution/+pots/evolution-2.2/") > >>> anon_browser.title > - 'Translation status for... > - ...Template "evolution-2.2" in Ubuntu Hoary package "evolution"...' > + 'Template ...evolution-2.2... : ...evolution... package : Translations : 5.04 : Ubuntu' > > The owner of the template is diplayed. > > >>> owner_display = find_tag_by_id(anon_browser.contents, > ... 'potemplate-owner') > >>> print extract_text(owner_display) > - This template is owned by > - Rosetta Administrators > + Owner: Rosetta Administrators > > The page lists the status of all the translations. It merges the > No Privileges Person's languages (which are South African) with > @@ -27,7 +25,7 @@ > > >>> content = find_main_content(anon_browser.contents) > >>> print extract_text(content.findAll('h1')[0]) > - Translation status for evolution-2.2 > + Translation status > > >>> table = content.findAll('table')[0] > >>> for row in table.findAll('tr'): > @@ -48,13 +46,13 @@ > >>> alternate_notice = find_tag_by_id(anon_browser.contents, > ... 'potemplate-relatives') > >>> print extract_text(alternate_notice) > - Other templates from the same source: evolution-2.2. > + Other templates here: evolution-2.2 > > The notice links to the alternate template. > > >>> print alternate_notice Why doesn't this have an extract_text? >