Merge ~cjwatson/launchpad:distroseries-urls-canonical into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 4013ff1a5a358052b99cae5abec44473e737d2e8
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:distroseries-urls-canonical
Merge into: launchpad:master
Diff against target: 4747 lines (+635/-557)
127 files modified
lib/canonical/launchpad/icing/style.css (+5/-5)
lib/lp/answers/stories/question-add.txt (+1/-1)
lib/lp/app/browser/doc/launchpad-search-pages.txt (+1/-1)
lib/lp/app/browser/launchpad.py (+1/-1)
lib/lp/app/browser/lazrjs.py (+1/-1)
lib/lp/app/stories/basics/notfound-traversals.txt (+5/-4)
lib/lp/blueprints/stories/blueprints/xx-creation.txt (+7/-6)
lib/lp/blueprints/stories/blueprints/xx-distrorelease.txt (+6/-4)
lib/lp/blueprints/stories/standalone/xx-overview.txt (+5/-3)
lib/lp/blueprints/stories/standalone/xx-views.txt (+3/-3)
lib/lp/bugs/stories/bug-release-management/xx-bug-release-management.txt (+2/-1)
lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt (+2/-2)
lib/lp/bugs/stories/bugs/xx-bugs.txt (+1/-1)
lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt (+7/-6)
lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt (+2/-1)
lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt (+3/-2)
lib/lp/bugs/stories/bugtask-management/xx-change-milestone.txt (+2/-1)
lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt (+2/-1)
lib/lp/bugs/stories/feeds/xx-bug-atom.txt (+5/-4)
lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt (+1/-1)
lib/lp/bugs/stories/guided-filebug/xx-ubuntu-filebug.txt (+2/-1)
lib/lp/bugs/stories/standalone/xx-show-distribution-cve-report.txt (+1/-1)
lib/lp/bugs/stories/standalone/xx-show-distrorelease-cve-report.txt (+2/-2)
lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt (+3/-3)
lib/lp/bugs/tests/test_searchtasks_webservice.py (+4/-2)
lib/lp/code/stories/webservice/xx-code-import.txt (+2/-3)
lib/lp/registry/browser/configure.zcml (+1/-1)
lib/lp/registry/browser/distribution.py (+7/-5)
lib/lp/registry/browser/tests/distroseries-views.txt (+2/-2)
lib/lp/registry/browser/tests/packaging-views.txt (+3/-3)
lib/lp/registry/browser/tests/sourcepackage-views.txt (+5/-5)
lib/lp/registry/browser/tests/test_distribution.py (+21/-21)
lib/lp/registry/browser/tests/test_packaging.py (+4/-3)
lib/lp/registry/browser/tests/test_sourcepackage_views.py (+1/-1)
lib/lp/registry/stories/distribution/xx-distribution-overview.txt (+9/-8)
lib/lp/registry/stories/distroseries/distroseries-admin.txt (+11/-10)
lib/lp/registry/stories/distroseries/xx-distroseries-index.txt (+7/-7)
lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt (+7/-6)
lib/lp/registry/stories/milestone/object-milestones.txt (+4/-2)
lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt (+5/-3)
lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt (+5/-4)
lib/lp/registry/stories/milestone/xx-milestone-description.txt (+2/-1)
lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt (+4/-3)
lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt (+2/-2)
lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt (+5/-5)
lib/lp/registry/stories/person/xx-deactivate-account.txt (+2/-1)
lib/lp/registry/stories/product/xx-product-package-pages.txt (+7/-4)
lib/lp/registry/stories/productseries/xx-productseries-delete.txt (+3/-1)
lib/lp/registry/stories/productseries/xx-productseries-index.txt (+1/-1)
lib/lp/registry/stories/webservice/xx-distribution.txt (+3/-3)
lib/lp/registry/stories/webservice/xx-distroseries.txt (+27/-25)
lib/lp/registry/stories/webservice/xx-source-package.txt (+3/-3)
lib/lp/services/feeds/stories/xx-links.txt (+2/-2)
lib/lp/services/sitesearch/tests/data/bingsearchservice-bugs-2.json (+1/-1)
lib/lp/services/sitesearch/tests/test_bing.py (+1/-1)
lib/lp/services/webapp/doc/canonical_url_examples.txt (+5/-5)
lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.html (+2/-2)
lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.js (+4/-4)
lib/lp/snappy/tests/test_snap.py (+1/-1)
lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt (+4/-2)
lib/lp/soyuz/browser/tests/sourcepackage-views.txt (+4/-2)
lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt (+2/-2)
lib/lp/soyuz/stories/distroseries/add-architecture.txt (+6/-5)
lib/lp/soyuz/stories/packaging/package-pages-navigation.txt (+5/-4)
lib/lp/soyuz/stories/soyuz/xx-binarypackagerelease-index.txt (+9/-7)
lib/lp/soyuz/stories/soyuz/xx-build-record.txt (+6/-6)
lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt (+5/-5)
lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt (+2/-2)
lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt (+9/-8)
lib/lp/soyuz/stories/soyuz/xx-distroarchseries.txt (+8/-7)
lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt (+7/-5)
lib/lp/soyuz/stories/soyuz/xx-distroseries-index.txt (+4/-4)
lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt (+18/-16)
lib/lp/soyuz/stories/soyuz/xx-person-packages.txt (+1/-1)
lib/lp/soyuz/stories/soyuz/xx-portlet-publishing-details.txt (+1/-1)
lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt (+1/-1)
lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt (+4/-4)
lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt (+8/-5)
lib/lp/soyuz/stories/webservice/xx-archive.txt (+4/-4)
lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt (+1/-1)
lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt (+8/-8)
lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt (+1/-1)
lib/lp/soyuz/stories/webservice/xx-packageset.txt (+7/-7)
lib/lp/soyuz/stories/webservice/xx-packageupload.txt (+2/-2)
lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt (+1/-1)
lib/lp/testing/pages.py (+1/-1)
lib/lp/translations/browser/tests/pofile-views.txt (+1/-1)
lib/lp/translations/browser/tests/test_breadcrumbs.py (+3/-3)
lib/lp/translations/doc/canonical_url_examples.txt (+3/-3)
lib/lp/translations/doc/poexport-request.txt (+3/-2)
lib/lp/translations/stories/distribution/xx-distribution-translations.txt (+9/-9)
lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt (+7/-7)
lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt (+19/-14)
lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt (+1/-1)
lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt (+2/-1)
lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt (+4/-4)
lib/lp/translations/stories/navigation-links/pofile.txt (+3/-3)
lib/lp/translations/stories/navigation-links/pomsgset.txt (+3/-3)
lib/lp/translations/stories/navigation-links/potemplate.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-pofile-details.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-pofile-export.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt (+2/-2)
lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt (+7/-6)
lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt (+7/-7)
lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt (+6/-6)
lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-pofile-translate.txt (+9/-8)
lib/lp/translations/stories/standalone/xx-potemplate-admin.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-potemplate-export.txt (+4/-4)
lib/lp/translations/stories/standalone/xx-potemplate-index.txt (+20/-19)
lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt (+4/-4)
lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-series-templates.txt (+18/-13)
lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt (+9/-9)
lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt (+8/-7)
lib/lp/translations/stories/standalone/xx-test-potlists.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-translation-help.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt (+21/-18)
lib/lp/translations/stories/translationgroups/xx-translationgroups.txt (+16/-16)
lib/lp/translations/stories/translations/xx-translations.txt (+40/-35)
lib/lp/translations/stories/webservice/xx-potemplate.txt (+6/-5)
Reviewer Review Type Date Requested Status
Tom Wardill (community) Approve
Review via email: mp+391191@code.launchpad.net

Commit message

Make new-style distroseries URLs canonical

Description of the change

/<distribution>/<distroseries> is now a redirect to the canonical form of /<distribution>/+series/<distroseries>. This makes it more conceivable to use the default traversal on distributions for something more common.

To post a comment you must log in.
Revision history for this message
Tom Wardill (twom) wrote :

That's a lot of test changes :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/canonical/launchpad/icing/style.css b/lib/canonical/launchpad/icing/style.css
index 92f2d6f..1d73268 100644
--- a/lib/canonical/launchpad/icing/style.css
+++ b/lib/canonical/launchpad/icing/style.css
@@ -812,7 +812,7 @@ input.translate {width: 90%; max-width: 60em;}
812/* Templates listing.812/* Templates listing.
813 *813 *
814 * Examples:814 * Examples:
815 * https://translations.launchpad.test/ubuntu/hoary/+templates815 * https://translations.launchpad.test/ubuntu/+series/hoary/+templates
816 * https://translations.launchpad.test/evolution/trunk/+templates816 * https://translations.launchpad.test/evolution/trunk/+templates
817 */817 */
818.inactive-template td {818.inactive-template td {
@@ -823,7 +823,7 @@ input.translate {width: 90%; max-width: 60em;}
823/* Translations statistics and legend.823/* Translations statistics and legend.
824 *824 *
825 * Examples:825 * Examples:
826 * https://translations.launchpad.test/ubuntu/hoary/+lang/es826 * https://translations.launchpad.test/ubuntu/+series/hoary/+lang/es
827 * https://translations.launchpad.test/evolution/trunk/+lang/es827 * https://translations.launchpad.test/evolution/trunk/+lang/es
828 */828 */
829829
@@ -857,9 +857,9 @@ table.translation-stats tfoot td {
857/* Translations help links.857/* Translations help links.
858 *858 *
859 * Examples:859 * Examples:
860 * https://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/860 * https://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/
861 * https://translations.launchpad.test/ubuntu/hoary/+source/evolution/+translations861 * https://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+translations
862 * https://translations.launchpad.test/ubuntu/hoary/862 * https://translations.launchpad.test/ubuntu/+series/hoary/
863 *863 *
864 */864 */
865div.translation-help-links a {865div.translation-help-links a {
diff --git a/lib/lp/answers/stories/question-add.txt b/lib/lp/answers/stories/question-add.txt
index b8cfea0..614ca54 100644
--- a/lib/lp/answers/stories/question-add.txt
+++ b/lib/lp/answers/stories/question-add.txt
@@ -37,7 +37,7 @@ start the creation process. Questions created this way will be
37associated with the source package of the used application.37associated with the source package of the used application.
3838
39 >>> user_browser.open(39 >>> user_browser.open(
40 ... 'http://launchpad.test/ubuntu/hoary/'40 ... 'http://launchpad.test/ubuntu/+series/hoary/'
41 ... '+sources/mozilla-firefox/+gethelp')41 ... '+sources/mozilla-firefox/+gethelp')
42 >>> print(user_browser.title)42 >>> print(user_browser.title)
43 Help and support...43 Help and support...
diff --git a/lib/lp/app/browser/doc/launchpad-search-pages.txt b/lib/lp/app/browser/doc/launchpad-search-pages.txt
index 83347e4..e7f211c 100644
--- a/lib/lp/app/browser/doc/launchpad-search-pages.txt
+++ b/lib/lp/app/browser/doc/launchpad-search-pages.txt
@@ -519,7 +519,7 @@ showing the matching terms in context of the page text.
519 >>> page.title519 >>> page.title
520 u'...Bug... #2 in Ubuntu Hoary: \u201cBlackhole Trash folder\u201d'520 u'...Bug... #2 in Ubuntu Hoary: \u201cBlackhole Trash folder\u201d'
521 >>> page.url521 >>> page.url
522 'http://bugs.launchpad.test/ubuntu/hoary/+bug/2'522 'http://bugs.launchpad.test/ubuntu/+series/hoary/+bug/2'
523 >>> page.summary523 >>> page.summary
524 u'...Launchpad\u2019s ...bug... tracker allows collaboration...'524 u'...Launchpad\u2019s ...bug... tracker allows collaboration...'
525525
diff --git a/lib/lp/app/browser/launchpad.py b/lib/lp/app/browser/launchpad.py
index d31df20..28064f9 100644
--- a/lib/lp/app/browser/launchpad.py
+++ b/lib/lp/app/browser/launchpad.py
@@ -476,7 +476,7 @@ class Macro:
476 http://launchpad.net/+main-template-macros476 http://launchpad.net/+main-template-macros
477 http://launchpad.net/ubuntu/+main-template-macros477 http://launchpad.net/ubuntu/+main-template-macros
478 http://launchpad.net/ubuntu/+main-template-macros478 http://launchpad.net/ubuntu/+main-template-macros
479 https://blueprints.launchpad.test/ubuntu/hoary/+main-template-macros479 https://blueprints.launchpad.test/ubuntu/+series/hoary/+main-template-macros
480480
481 Obviously, those requests wouldn't do anything useful and would instead481 Obviously, those requests wouldn't do anything useful and would instead
482 generate an OOPS.482 generate an OOPS.
diff --git a/lib/lp/app/browser/lazrjs.py b/lib/lp/app/browser/lazrjs.py
index 8288bf3..093a803 100644
--- a/lib/lp/app/browser/lazrjs.py
+++ b/lib/lp/app/browser/lazrjs.py
@@ -460,7 +460,7 @@ class InlineMultiCheckboxWidget(WidgetBase):
460 :param attribute_type: The attribute type. Currently only "reference"460 :param attribute_type: The attribute type. Currently only "reference"
461 is supported. Used to determine whether to linkify the selected461 is supported. Used to determine whether to linkify the selected
462 checkbox item values. So ubuntu/hoary becomes462 checkbox item values. So ubuntu/hoary becomes
463 http://launchpad.net/devel/api/ubuntu/hoary463 http://launchpad.net/devel/api/ubuntu/+series/hoary
464 :param vocabulary: The name of the vocabulary which provides the464 :param vocabulary: The name of the vocabulary which provides the
465 items or a vocabulary instance.465 items or a vocabulary instance.
466 :param header: The text to display as the title of the popup form.466 :param header: The text to display as the title of the popup form.
diff --git a/lib/lp/app/stories/basics/notfound-traversals.txt b/lib/lp/app/stories/basics/notfound-traversals.txt
index 4a6cc78..56ad01b 100644
--- a/lib/lp/app/stories/basics/notfound-traversals.txt
+++ b/lib/lp/app/stories/basics/notfound-traversals.txt
@@ -52,9 +52,9 @@ Ubuntu release is still pointing to this old URL (see bug #138090).
52 http://launchpad.test/firefox52 http://launchpad.test/firefox
53 >>> check_redirect("/ubuntu/+source/evolution/+editbugcontact")53 >>> check_redirect("/ubuntu/+source/evolution/+editbugcontact")
54 +subscribe54 +subscribe
55 >>> check_redirect("/ubuntu/hoary/+latest-full-language-pack")55 >>> check_redirect("/ubuntu/+series/hoary/+latest-full-language-pack")
56 http://localhost:.../ubuntu-hoary-translations.tar.gz56 http://localhost:.../ubuntu-hoary-translations.tar.gz
57 >>> check_redirect("/ubuntu/hoary/+source/mozilla-firefox/+pots")57 >>> check_redirect("/ubuntu/+series/hoary/+source/mozilla-firefox/+pots")
58 http://launchpad.test/.../+pots/../+translations58 http://launchpad.test/.../+pots/../+translations
5959
60Viewing a bug in the context of an upstream where the bug has already60Viewing a bug in the context of an upstream where the bug has already
@@ -106,10 +106,11 @@ distroseries or sourcepackage is *targeted* to be fixed in that specific
106release. Instead, you get redirected to the appropriate distro or106release. Instead, you get redirected to the appropriate distro or
107distrosourcepackage filebug page.107distrosourcepackage filebug page.
108108
109 >>> check_redirect("/ubuntu/warty/+filebug", auth=True)109 >>> check_redirect("/ubuntu/+series/warty/+filebug", auth=True)
110 http://launchpad.test/ubuntu/+filebug110 http://launchpad.test/ubuntu/+filebug
111 >>> check_redirect(111 >>> check_redirect(
112 ... "/ubuntu/warty/+source/mozilla-firefox/+filebug", auth=True)112 ... "/ubuntu/+series/warty/+source/mozilla-firefox/+filebug",
113 ... auth=True)
113 http://launchpad.test/ubuntu/+source/mozilla-firefox/+filebug114 http://launchpad.test/ubuntu/+source/mozilla-firefox/+filebug
114115
115The old +filebug-advanced form now redirects to the +filebug form.116The old +filebug-advanced form now redirects to the +filebug form.
diff --git a/lib/lp/blueprints/stories/blueprints/xx-creation.txt b/lib/lp/blueprints/stories/blueprints/xx-creation.txt
index 8eeb212..162ee6c 100644
--- a/lib/lp/blueprints/stories/blueprints/xx-creation.txt
+++ b/lib/lp/blueprints/stories/blueprints/xx-creation.txt
@@ -98,7 +98,8 @@ From a distribution series
9898
99Starting from the Ubuntu Hoary distribution series page:99Starting from the Ubuntu Hoary distribution series page:
100100
101 >>> user_browser.open('http://blueprints.launchpad.test/ubuntu/hoary')101 >>> user_browser.open(
102 ... 'http://blueprints.launchpad.test/ubuntu/+series/hoary')
102103
103Users can also follow the textual "Register a blueprint" link:104Users can also follow the textual "Register a blueprint" link:
104105
@@ -106,7 +107,7 @@ Users can also follow the textual "Register a blueprint" link:
106 ... user_browser.contents, 'menu-link-new'):107 ... user_browser.contents, 'menu-link-new'):
107 ... print(tag)108 ... print(tag)
108 <a class="menu-link-new..."109 <a class="menu-link-new..."
109 href="http://blueprints.launchpad.test/ubuntu/hoary/+addspec">Register110 href="http://blueprints.launchpad.test/ubuntu/+series/hoary/+addspec">Register
110 a blueprint</a>111 a blueprint</a>
111112
112113
@@ -288,7 +289,7 @@ the series.
288Let's register a blueprint from the Ubuntu Hoary distribution series:289Let's register a blueprint from the Ubuntu Hoary distribution series:
289290
290 >>> user_browser.open(291 >>> user_browser.open(
291 ... 'http://blueprints.launchpad.test/ubuntu/hoary/+addspec')292 ... 'http://blueprints.launchpad.test/ubuntu/+series/hoary/+addspec')
292 >>> control('Name').value = 'networkmagic-2'293 >>> control('Name').value = 'networkmagic-2'
293 >>> control('Title').value = 'Network Magic: Auto Network Detection'294 >>> control('Title').value = 'Network Magic: Auto Network Detection'
294 >>> control('URL').value = 'http://wiki.ubuntu.com/NetworkMagic2'295 >>> control('URL').value = 'http://wiki.ubuntu.com/NetworkMagic2'
@@ -297,7 +298,7 @@ Let's register a blueprint from the Ubuntu Hoary distribution series:
297Canceling creation, brings one back to the blueprints Hoary home.298Canceling creation, brings one back to the blueprints Hoary home.
298299
299 >>> user_browser.getLink('Cancel').url300 >>> user_browser.getLink('Cancel').url
300 'http://blueprints.launchpad.test/ubuntu/hoary'301 'http://blueprints.launchpad.test/ubuntu/+series/hoary'
301302
302By default, blueprints are not proposed as series goals:303By default, blueprints are not proposed as series goals:
303304
@@ -321,7 +322,7 @@ The new blueprint is not proposed as a series goal:
321Let's register another blueprint from the Mozilla Firefox 1.0 product series:322Let's register another blueprint from the Mozilla Firefox 1.0 product series:
322323
323 >>> user_browser.open(324 >>> user_browser.open(
324 ... 'http://blueprints.launchpad.test/ubuntu/hoary/+addspec')325 ... 'http://blueprints.launchpad.test/ubuntu/+series/hoary/+addspec')
325 >>> control('Name').value = 'networkmagic-3'326 >>> control('Name').value = 'networkmagic-3'
326 >>> control('Title').value = 'Network Magic: Auto Network Detection'327 >>> control('Title').value = 'Network Magic: Auto Network Detection'
327 >>> control('URL').value = 'http://wiki.ubuntu.com/NetworkMagic3'328 >>> control('URL').value = 'http://wiki.ubuntu.com/NetworkMagic3'
@@ -350,7 +351,7 @@ If the registration is performed by a user with permission to accept goals
350for the series, the new blueprint is automatically accepted as a series goal:351for the series, the new blueprint is automatically accepted as a series goal:
351352
352 >>> admin_browser.open(353 >>> admin_browser.open(
353 ... 'http://blueprints.launchpad.test/ubuntu/hoary/+addspec')354 ... 'http://blueprints.launchpad.test/ubuntu/+series/hoary/+addspec')
354 >>> control = admin_browser.getControl355 >>> control = admin_browser.getControl
355 >>> control('Name').value = 'networkmagic-4'356 >>> control('Name').value = 'networkmagic-4'
356 >>> control('Title').value = 'Network Magic: Auto Network Detection'357 >>> control('Title').value = 'Network Magic: Auto Network Detection'
diff --git a/lib/lp/blueprints/stories/blueprints/xx-distrorelease.txt b/lib/lp/blueprints/stories/blueprints/xx-distrorelease.txt
index af5e43f..6a058b6 100644
--- a/lib/lp/blueprints/stories/blueprints/xx-distrorelease.txt
+++ b/lib/lp/blueprints/stories/blueprints/xx-distrorelease.txt
@@ -76,26 +76,28 @@ first be approved.
7676
77 >>> import six77 >>> import six
78 >>> result = six.text_type(http(r"""78 >>> result = six.text_type(http(r"""
79 ... GET /ubuntu/hoary/+specs HTTP/1.179 ... GET /ubuntu/+series/hoary/+specs HTTP/1.1
80 ... """))80 ... """))
81 >>> '<td>CD Media Integrity Check' not in result81 >>> '<td>CD Media Integrity Check' not in result
82 True82 True
8383
84However, we can expect to find it on the approvals page.84However, we can expect to find it on the approvals page.
8585
86 >>> user_browser.open('http://blueprints.launchpad.test/ubuntu/grumpy/+specs')86 >>> user_browser.open(
87 ... 'http://blueprints.launchpad.test/ubuntu/+series/grumpy/+specs')
87 >>> "CD Media Integrity Check" in user_browser.contents88 >>> "CD Media Integrity Check" in user_browser.contents
88 False89 False
8990
90We will accept it:91We will accept it:
9192
92 >>> admin_browser.open('http://blueprints.launchpad.test/ubuntu/grumpy/+setgoals')93 >>> admin_browser.open(
94 ... 'http://blueprints.launchpad.test/ubuntu/+series/grumpy/+setgoals')
93 >>> 'CD Media Integrity' in admin_browser.contents95 >>> 'CD Media Integrity' in admin_browser.contents
94 True96 True
95 >>> admin_browser.getControl('CD Media Integrity Check').selected = True97 >>> admin_browser.getControl('CD Media Integrity Check').selected = True
96 >>> admin_browser.getControl('Accept').click()98 >>> admin_browser.getControl('Accept').click()
97 >>> admin_browser.url99 >>> admin_browser.url
98 'http://blueprints.launchpad.test/ubuntu/grumpy'100 'http://blueprints.launchpad.test/ubuntu/+series/grumpy'
99 >>> 'Accepted 1 specification(s)' in admin_browser.contents101 >>> 'Accepted 1 specification(s)' in admin_browser.contents
100 True102 True
101103
diff --git a/lib/lp/blueprints/stories/standalone/xx-overview.txt b/lib/lp/blueprints/stories/standalone/xx-overview.txt
index 51f6894..153fe4d 100644
--- a/lib/lp/blueprints/stories/standalone/xx-overview.txt
+++ b/lib/lp/blueprints/stories/standalone/xx-overview.txt
@@ -147,7 +147,8 @@ those targeted to a given distribution series. Let's pick the Grumpy Groundhog
147series as an example. To begin with, there are no blueprints listed on the147series as an example. To begin with, there are no blueprints listed on the
148blueprints page for Grumpy:148blueprints page for Grumpy:
149149
150 >>> user_browser.open('http://blueprints.launchpad.test/ubuntu/grumpy')150 >>> user_browser.open(
151 ... 'http://blueprints.launchpad.test/ubuntu/+series/grumpy')
151 >>> main = find_main_content(user_browser.contents)152 >>> main = find_main_content(user_browser.contents)
152 >>> print(extract_text(main).encode('ascii', 'backslashreplace'))153 >>> print(extract_text(main).encode('ascii', 'backslashreplace'))
153 Blueprints for Grumpy154 Blueprints for Grumpy
@@ -177,7 +178,7 @@ Let's target an existing Ubuntu blueprint to the Grumpy series:
177We'll also target the blueprint to a milestone. First we'll create a178We'll also target the blueprint to a milestone. First we'll create a
178milestone:179milestone:
179180
180 >>> browser.open('http://launchpad.test/ubuntu/grumpy/')181 >>> browser.open('http://launchpad.test/ubuntu/+series/grumpy/')
181 >>> browser.getLink('Create milestone').click()182 >>> browser.getLink('Create milestone').click()
182 >>> browser.getControl('Name').value = 'drift-1'183 >>> browser.getControl('Name').value = 'drift-1'
183 >>> browser.getControl('Date Targeted').value = '2050-05-05'184 >>> browser.getControl('Date Targeted').value = '2050-05-05'
@@ -206,7 +207,8 @@ Now we'll target our chosen blueprint to the new milestone:
206Finally, the blueprint listing for Grumpy includes an entry for our chosen207Finally, the blueprint listing for Grumpy includes an entry for our chosen
207blueprint. It also lists the milestone to which the blueprint is targeted:208blueprint. It also lists the milestone to which the blueprint is targeted:
208209
209 >>> user_browser.open('http://blueprints.launchpad.test/ubuntu/grumpy')210 >>> user_browser.open(
211 ... 'http://blueprints.launchpad.test/ubuntu/+series/grumpy')
210 >>> main = find_main_content(user_browser.contents)212 >>> main = find_main_content(user_browser.contents)
211 >>> print(extract_text(main).encode('ascii', 'backslashreplace'))213 >>> print(extract_text(main).encode('ascii', 'backslashreplace'))
212 Blueprints for Grumpy...214 Blueprints for Grumpy...
diff --git a/lib/lp/blueprints/stories/standalone/xx-views.txt b/lib/lp/blueprints/stories/standalone/xx-views.txt
index f37bcfc..b03032c 100644
--- a/lib/lp/blueprints/stories/standalone/xx-views.txt
+++ b/lib/lp/blueprints/stories/standalone/xx-views.txt
@@ -137,7 +137,7 @@ project, distro and distroseries.
137 ...137 ...
138138
139 >>> print(http("""139 >>> print(http("""
140 ... GET /ubuntu/hoary/+documentation HTTP/1.1140 ... GET /ubuntu/+series/hoary/+documentation HTTP/1.1
141 ... """))141 ... """))
142 HTTP/1.1 200 Ok142 HTTP/1.1 200 Ok
143 ...143 ...
@@ -243,10 +243,10 @@ blueprint targets:
243243
244 * distribution series:244 * distribution series:
245245
246 >>> browser.open('http://blueprints.launchpad.test/ubuntu/hoary')246 >>> browser.open('http://blueprints.launchpad.test/ubuntu/+series/hoary')
247 >>> browser.getLink('List all blueprints').click()247 >>> browser.getLink('List all blueprints').click()
248 >>> browser.url248 >>> browser.url
249 'http://blueprints.launchpad.test/ubuntu/hoary/+specs?show=all'249 'http://blueprints.launchpad.test/ubuntu/+series/hoary/+specs?show=all'
250250
251 * project groups:251 * project groups:
252252
diff --git a/lib/lp/bugs/stories/bug-release-management/xx-bug-release-management.txt b/lib/lp/bugs/stories/bug-release-management/xx-bug-release-management.txt
index 3c93bc9..fab7204 100644
--- a/lib/lp/bugs/stories/bug-release-management/xx-bug-release-management.txt
+++ b/lib/lp/bugs/stories/bug-release-management/xx-bug-release-management.txt
@@ -208,7 +208,8 @@ in the release task.
208 LinkNotFoundError...208 LinkNotFoundError...
209209
210 >>> ubuntu_hoary_edit_url = (210 >>> ubuntu_hoary_edit_url = (
211 ... 'http://bugs.launchpad.test/ubuntu/hoary/+bug/2/+editstatus')211 ... 'http://bugs.launchpad.test/ubuntu/+series/hoary/+bug/2/'
212 ... '+editstatus')
212 >>> user_browser.getLink(url=ubuntu_hoary_edit_url) is not None213 >>> user_browser.getLink(url=ubuntu_hoary_edit_url) is not None
213 True214 True
214215
diff --git a/lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt b/lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt
index 4f6594f..27211da 100644
--- a/lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt
+++ b/lib/lp/bugs/stories/bugs/xx-bug-obfuscation.txt
@@ -11,7 +11,7 @@ description in the bug page.
1111
12 >>> user_browser.open(12 >>> user_browser.open(
13 ... 'http://bugs.launchpad.test'13 ... 'http://bugs.launchpad.test'
14 ... '/debian/sarge/+source/mozilla-firefox/+bug/3')14 ... '/debian/+series/sarge/+source/mozilla-firefox/+bug/3')
15 >>> user_browser.title15 >>> user_browser.title
16 'Bug #3 ...'16 'Bug #3 ...'
1717
@@ -24,7 +24,7 @@ An anonymous cannot see the email address anywhere in the page.
2424
25 >>> anon_browser.open(25 >>> anon_browser.open(
26 ... 'http://bugs.launchpad.test'26 ... 'http://bugs.launchpad.test'
27 ... '/debian/sarge/+source/mozilla-firefox/+bug/3')27 ... '/debian/+series/sarge/+source/mozilla-firefox/+bug/3')
28 >>> print(anon_browser.title)28 >>> print(anon_browser.title)
29 Bug #3 ...29 Bug #3 ...
3030
diff --git a/lib/lp/bugs/stories/bugs/xx-bugs.txt b/lib/lp/bugs/stories/bugs/xx-bugs.txt
index 0dd58c7..c2b8777 100644
--- a/lib/lp/bugs/stories/bugs/xx-bugs.txt
+++ b/lib/lp/bugs/stories/bugs/xx-bugs.txt
@@ -1,7 +1,7 @@
1This page checks that we can see a list of bugs on the distroseries,1This page checks that we can see a list of bugs on the distroseries,
2specifically Hoary.2specifically Hoary.
33
4 >>> browser.open('http://localhost/ubuntu/hoary/+bugs')4 >>> browser.open('http://localhost/ubuntu/+series/hoary/+bugs')
5 >>> print(browser.title)5 >>> print(browser.title)
6 Hoary (5.04) : Bugs : Ubuntu 6 Hoary (5.04) : Bugs : Ubuntu
77
diff --git a/lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt b/lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt
index 7d95a21..f06d582 100644
--- a/lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt
+++ b/lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt
@@ -3,7 +3,8 @@
3The +bugs page for a distribution series presents some basic information the3The +bugs page for a distribution series presents some basic information the
4bugs, as well as a listing.4bugs, as well as a listing.
55
6 >>> anon_browser.open('http://bugs.launchpad.test/ubuntu/warty/+bugs')6 >>> anon_browser.open(
7 ... 'http://bugs.launchpad.test/ubuntu/+series/warty/+bugs')
7 >>> anon_browser.title8 >>> anon_browser.title
8 'Warty (4.10) : Bugs : Ubuntu'9 'Warty (4.10) : Bugs : Ubuntu'
910
@@ -14,16 +15,16 @@ The page has a link to see all open bugs.
1415
15 >>> anon_browser.getLink('Open bugs').click()16 >>> anon_browser.getLink('Open bugs').click()
16 >>> anon_browser.url17 >>> anon_browser.url
17 'http://bugs.launchpad.test/ubuntu/warty/+bugs'18 'http://bugs.launchpad.test/ubuntu/+series/warty/+bugs'
18 >>> find_tags_by_class(anon_browser.contents, 'buglisting-row') is not None19 >>> find_tags_by_class(anon_browser.contents, 'buglisting-row') is not None
19 True20 True
2021
21It also has a link to subscribe to bug mail.22It also has a link to subscribe to bug mail.
2223
23 >>> user_browser.open('http://bugs.launchpad.test/ubuntu/warty')24 >>> user_browser.open('http://bugs.launchpad.test/ubuntu/+series/warty')
24 >>> user_browser.getLink('Subscribe to bug mail').click()25 >>> user_browser.getLink('Subscribe to bug mail').click()
25 >>> print(user_browser.url)26 >>> print(user_browser.url)
26 http://bugs.launchpad.test/ubuntu/warty/+subscribe27 http://bugs.launchpad.test/ubuntu/+series/warty/+subscribe
2728
2829
29== Bugs Fixed Elsewhere ==30== Bugs Fixed Elsewhere ==
@@ -31,7 +32,7 @@ It also has a link to subscribe to bug mail.
31The Bugs frontpage includes the number of bugs that are fixed in some32The Bugs frontpage includes the number of bugs that are fixed in some
32other context.33other context.
3334
34 >>> anon_browser.open('http://bugs.launchpad.test/ubuntu/warty')35 >>> anon_browser.open('http://bugs.launchpad.test/ubuntu/+series/warty')
35 >>> fixed_elsewhere_link = anon_browser.getLink('Bugs fixed elsewhere')36 >>> fixed_elsewhere_link = anon_browser.getLink('Bugs fixed elsewhere')
3637
37The link takes you to the list of the bugs fixed elsewhere.38The link takes you to the list of the bugs fixed elsewhere.
@@ -51,7 +52,7 @@ The link takes you to the list of the bugs fixed elsewhere.
51The bugs page displays the number of Incomplete, unattended bugs that52The bugs page displays the number of Incomplete, unattended bugs that
52can expire when the project has enabled bug expiration.53can expire when the project has enabled bug expiration.
5354
54 >>> anon_browser.open('http://bugs.launchpad.test/ubuntu/warty')55 >>> anon_browser.open('http://bugs.launchpad.test/ubuntu/+series/warty')
55 >>> expirable_bugs_link = anon_browser.getLink('Incomplete bugs')56 >>> expirable_bugs_link = anon_browser.getLink('Incomplete bugs')
5657
57The link goes to the expirable bugs page, where the anonymous user can58The link goes to the expirable bugs page, where the anonymous user can
diff --git a/lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt b/lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt
index 1224187..a04d86f 100644
--- a/lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt
+++ b/lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt
@@ -58,7 +58,8 @@ becomes visible.
5858
59And look at the portlet.59And look at the portlet.
6060
61 >>> anon_browser.open("http://bugs.launchpad.test/debian/sarge/+bugs")61 >>> anon_browser.open(
62 ... "http://bugs.launchpad.test/debian/+series/sarge/+bugs")
62 >>> portlet = find_portlet(63 >>> portlet = find_portlet(
63 ... anon_browser.contents, "Milestone-targeted bugs")64 ... anon_browser.contents, "Milestone-targeted bugs")
64 >>> print(extract_text(portlet))65 >>> print(extract_text(portlet))
diff --git a/lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt b/lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt
index 207adb8..b515f36 100644
--- a/lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt
+++ b/lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt
@@ -23,7 +23,8 @@ Change debian to track bugs in Launchpad and the portlet becomes visible.
23 223 2
24 woody24 woody
2525
26 >>> anon_browser.open("http://bugs.launchpad.test/debian/sarge/+bugs")26 >>> anon_browser.open(
27 ... "http://bugs.launchpad.test/debian/+series/sarge/+bugs")
27 >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs")28 >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs")
28 >>> print(extract_text(portlet))29 >>> print(extract_text(portlet))
29 Series-targeted bugs30 Series-targeted bugs
@@ -42,7 +43,7 @@ Change debian to track bugs in Launchpad and the portlet becomes visible.
42 warty43 warty
4344
44 >>> print(anon_browser.getLink("hoary").url)45 >>> print(anon_browser.getLink("hoary").url)
45 http://bugs.launchpad.test/ubuntu/hoary/+bugs46 http://bugs.launchpad.test/ubuntu/+series/hoary/+bugs
4647
47The same portlet is also available for project and project series48The same portlet is also available for project and project series
48listings and homepages:49listings and homepages:
diff --git a/lib/lp/bugs/stories/bugtask-management/xx-change-milestone.txt b/lib/lp/bugs/stories/bugtask-management/xx-change-milestone.txt
index b612e76..c9a79c4 100644
--- a/lib/lp/bugs/stories/bugtask-management/xx-change-milestone.txt
+++ b/lib/lp/bugs/stories/bugtask-management/xx-change-milestone.txt
@@ -75,7 +75,8 @@ Foo Bar is a member of the Ubuntu team that owns the Ubuntu
75distribution. They decide to assign some bug to some milestones.75distribution. They decide to assign some bug to some milestones.
76First they register a new milestone.76First they register a new milestone.
7777
78 >>> admin_browser.open('http://launchpad.test/ubuntu/hoary/+addmilestone')78 >>> admin_browser.open(
79 ... 'http://launchpad.test/ubuntu/+series/hoary/+addmilestone')
79 >>> name_field = admin_browser.getControl('Name:')80 >>> name_field = admin_browser.getControl('Name:')
80 >>> name_field.value = '5.04.rc1'81 >>> name_field.value = '5.04.rc1'
81 >>> admin_browser.getControl('Register Milestone').click()82 >>> admin_browser.getControl('Register Milestone').click()
diff --git a/lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt b/lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt
index 7300d25..ba1a71f 100644
--- a/lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt
+++ b/lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt
@@ -223,7 +223,8 @@ Milestones are also presented as badges on bugs, and linked to the
223relevant listings:223relevant listings:
224224
225 >>> browser.open(225 >>> browser.open(
226 ... 'http://bugs.launchpad.test/debian/sarge/+source/mozilla-firefox')226 ... 'http://bugs.launchpad.test/debian/+series/sarge/+source/'
227 ... 'mozilla-firefox')
227 >>> milestone = find_tags_by_class(browser.contents, 'sprite milestone')228 >>> milestone = find_tags_by_class(browser.contents, 'sprite milestone')
228 >>> print(milestone[0])229 >>> print(milestone[0])
229 <a alt="milestone 3.1" class="sprite milestone"230 <a alt="milestone 3.1" class="sprite milestone"
diff --git a/lib/lp/bugs/stories/feeds/xx-bug-atom.txt b/lib/lp/bugs/stories/feeds/xx-bug-atom.txt
index 0620bef..b6fcb56 100644
--- a/lib/lp/bugs/stories/feeds/xx-bug-atom.txt
+++ b/lib/lp/bugs/stories/feeds/xx-bug-atom.txt
@@ -263,24 +263,25 @@ This feed gets the latest bugs for a distribution series, and has the same
263type of content as the latest bugs feed for a product.263type of content as the latest bugs feed for a product.
264264
265 >>> browser.open(265 >>> browser.open(
266 ... 'http://feeds.launchpad.test/ubuntu/hoary/latest-bugs.atom')266 ... 'http://feeds.launchpad.test/ubuntu/+series/hoary/'
267 ... 'latest-bugs.atom')
267 >>> validate_feed(browser.contents,268 >>> validate_feed(browser.contents,
268 ... browser.headers['content-type'], browser.url)269 ... browser.headers['content-type'], browser.url)
269 No Errors270 No Errors
270 >>> BeautifulSoup(browser.contents, 'xml').title.contents271 >>> BeautifulSoup(browser.contents, 'xml').title.contents
271 [u'Bugs in Hoary']272 [u'Bugs in Hoary']
272 >>> browser.url273 >>> browser.url
273 'http://feeds.launchpad.test/ubuntu/hoary/latest-bugs.atom'274 'http://feeds.launchpad.test/ubuntu/+series/hoary/latest-bugs.atom'
274275
275 >>> soup = BeautifulSoup(276 >>> soup = BeautifulSoup(
276 ... browser.contents, 'xml', parse_only=SoupStrainer('id'))277 ... browser.contents, 'xml', parse_only=SoupStrainer('id'))
277 >>> print(extract_text(soup.find('id')))278 >>> print(extract_text(soup.find('id')))
278 tag:launchpad.net,2006-10-16:/bugs/ubuntu/hoary279 tag:launchpad.net,2006-10-16:/bugs/ubuntu/+series/hoary
279280
280 >>> self_links = parse_links(browser.contents, 'self')281 >>> self_links = parse_links(browser.contents, 'self')
281 >>> for link in self_links:282 >>> for link in self_links:
282 ... print(link)283 ... print(link)
283 <link href="http://feeds.launchpad.test/ubuntu/hoary/latest-bugs.atom" rel="self"/>284 <link href="http://feeds.launchpad.test/ubuntu/+series/hoary/latest-bugs.atom" rel="self"/>
284285
285 >>> entries = parse_entries(browser.contents)286 >>> entries = parse_entries(browser.contents)
286 >>> print(len(entries))287 >>> print(len(entries))
diff --git a/lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt b/lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt
index 96782f6..637c64b 100644
--- a/lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt
+++ b/lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt
@@ -123,7 +123,7 @@ Bugs can also be reported directly against a distribution series, for
123which the guidelines are taken from the respective distribution.123which the guidelines are taken from the respective distribution.
124124
125 >>> user_browser.open(125 >>> user_browser.open(
126 ... 'http://launchpad.test/ubuntu/warty/+filebug')126 ... 'http://launchpad.test/ubuntu/+series/warty/+filebug')
127 >>> user_browser.getControl('Summary', index=0).value = "It doesn't work"127 >>> user_browser.getControl('Summary', index=0).value = "It doesn't work"
128 >>> user_browser.getControl('Continue').click()128 >>> user_browser.getControl('Continue').click()
129 >>> print(extract_text(find_tag_by_id(129 >>> print(extract_text(find_tag_by_id(
diff --git a/lib/lp/bugs/stories/guided-filebug/xx-ubuntu-filebug.txt b/lib/lp/bugs/stories/guided-filebug/xx-ubuntu-filebug.txt
index 7e202d9..62c733c 100644
--- a/lib/lp/bugs/stories/guided-filebug/xx-ubuntu-filebug.txt
+++ b/lib/lp/bugs/stories/guided-filebug/xx-ubuntu-filebug.txt
@@ -33,7 +33,8 @@ The no-redirect parameter is retained when we redirect a user to the bug
33filing view of another context.33filing view of another context.
3434
35 >>> user_browser.open(35 >>> user_browser.open(
36 ... 'http://bugs.launchpad.test/ubuntu/hoary/+filebug?no-redirect')36 ... 'http://bugs.launchpad.test/ubuntu/+series/hoary/+filebug'
37 ... '?no-redirect')
37 >>> print(user_browser.url)38 >>> print(user_browser.url)
38 http://bugs.launchpad.test/ubuntu/+filebug?no-redirect39 http://bugs.launchpad.test/ubuntu/+filebug?no-redirect
3940
diff --git a/lib/lp/bugs/stories/standalone/xx-show-distribution-cve-report.txt b/lib/lp/bugs/stories/standalone/xx-show-distribution-cve-report.txt
index 1020f76..1d3eec4 100644
--- a/lib/lp/bugs/stories/standalone/xx-show-distribution-cve-report.txt
+++ b/lib/lp/bugs/stories/standalone/xx-show-distribution-cve-report.txt
@@ -34,7 +34,7 @@ Instead, the links for the specific series reports are shown.
3434
35 >>> browser.getLink('Breezy Badger Autotest').click()35 >>> browser.getLink('Breezy Badger Autotest').click()
36 >>> browser.url36 >>> browser.url
37 'http://launchpad.test/ubuntu/breezy-autotest/+cve'37 'http://launchpad.test/ubuntu/+series/breezy-autotest/+cve'
3838
39 >>> main = find_main_content(browser.contents)39 >>> main = find_main_content(browser.contents)
40 >>> print(extract_text(main.h1))40 >>> print(extract_text(main.h1))
diff --git a/lib/lp/bugs/stories/standalone/xx-show-distrorelease-cve-report.txt b/lib/lp/bugs/stories/standalone/xx-show-distrorelease-cve-report.txt
index 069e840..fe1609f 100644
--- a/lib/lp/bugs/stories/standalone/xx-show-distrorelease-cve-report.txt
+++ b/lib/lp/bugs/stories/standalone/xx-show-distrorelease-cve-report.txt
@@ -1,6 +1,6 @@
1Let's look at all CVE issues in Debian and Debian Woody1Let's look at all CVE issues in Debian and Debian Woody
22
3 >>> browser.open('http://launchpad.test/debian/woody/+cve')3 >>> browser.open('http://launchpad.test/debian/+series/woody/+cve')
4 >>> print('\n'+browser.contents)4 >>> print('\n'+browser.contents)
5 <BLANKLINE>5 <BLANKLINE>
6 ...6 ...
@@ -36,7 +36,7 @@ sourcepackage value from the bug listed on the previous report.
3636
37 >>> logout()37 >>> logout()
3838
39 >>> browser.open('http://launchpad.test/debian/woody/+cve')39 >>> browser.open('http://launchpad.test/debian/+series/woody/+cve')
40 >>> main = find_main_content(browser.contents)40 >>> main = find_main_content(browser.contents)
41 >>> for tr in main.table.tbody.findAll('tr'):41 >>> for tr in main.table.tbody.findAll('tr'):
42 ... print(extract_text(tr))42 ... print(extract_text(tr))
diff --git a/lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt b/lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt
index 74481b4..234a83d 100644
--- a/lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt
+++ b/lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt
@@ -84,7 +84,7 @@ The content includes a link to the distribution CVE report.
84Distribution Series84Distribution Series
85-------------------85-------------------
8686
87 >>> path = 'debian/woody'87 >>> path = 'debian/+series/woody'
8888
89If the user is not logged-in general stats are shown. There is also a89If the user is not logged-in general stats are shown. There is also a
90link to review nominations.90link to review nominations.
@@ -147,7 +147,7 @@ reported bugs.
147The content includes a link to the distribution CVE report.147The content includes a link to the distribution CVE report.
148148
149 >>> print(user_browser.getLink('CVE report').url)149 >>> print(user_browser.getLink('CVE report').url)
150 http://bugs.launchpad.test/debian/woody/+cve150 http://bugs.launchpad.test/debian/+series/woody/+cve
151151
152152
153Distribution Source Package153Distribution Source Package
@@ -224,7 +224,7 @@ source packages do not have a CVE reports page.
224Source Package in Distribution Series224Source Package in Distribution Series
225-------------------------------------225-------------------------------------
226226
227 >>> path = 'debian/woody/+source/mozilla-firefox'227 >>> path = 'debian/+series/woody/+source/mozilla-firefox'
228228
229If the user is not logged-in general stats are shown. There is no229If the user is not logged-in general stats are shown. There is no
230option to subscribe to bug mail.230option to subscribe to bug mail.
diff --git a/lib/lp/bugs/tests/test_searchtasks_webservice.py b/lib/lp/bugs/tests/test_searchtasks_webservice.py
index 1a0ee93..63c9729 100644
--- a/lib/lp/bugs/tests/test_searchtasks_webservice.py
+++ b/lib/lp/bugs/tests/test_searchtasks_webservice.py
@@ -33,12 +33,14 @@ class TestOmitTargetedParameter(TestCaseWithFactory):
33 'launchpad-library', 'salgado-change-anything')33 'launchpad-library', 'salgado-change-anything')
3434
35 def test_omit_targeted_old_default_true(self):35 def test_omit_targeted_old_default_true(self):
36 response = self.webservice.named_get('/mebuntu/inkanyamba',36 response = self.webservice.named_get(
37 '/mebuntu/+series/inkanyamba',
37 'searchTasks', api_version='1.0').jsonBody()38 'searchTasks', api_version='1.0').jsonBody()
38 self.assertEqual(response['total_size'], 0)39 self.assertEqual(response['total_size'], 0)
3940
40 def test_omit_targeted_new_default_false(self):41 def test_omit_targeted_new_default_false(self):
41 response = self.webservice.named_get('/mebuntu/inkanyamba',42 response = self.webservice.named_get(
43 '/mebuntu/+series/inkanyamba',
42 'searchTasks', api_version='devel').jsonBody()44 'searchTasks', api_version='devel').jsonBody()
43 self.assertEqual(response['total_size'], 1)45 self.assertEqual(response['total_size'], 1)
4446
diff --git a/lib/lp/code/stories/webservice/xx-code-import.txt b/lib/lp/code/stories/webservice/xx-code-import.txt
index c8dd559..8534be5 100644
--- a/lib/lp/code/stories/webservice/xx-code-import.txt
+++ b/lib/lp/code/stories/webservice/xx-code-import.txt
@@ -223,9 +223,8 @@ We can create a Git-to-Git import.
223223
224We can also create an import targetting a source package.224We can also create an import targetting a source package.
225225
226 >>> source_package_url = (226 >>> source_package_url = '/%s/+series/%s/+source/%s' % (
227 ... '/' + distribution.name + '/' + distroseries.name + '/+source/'227 ... distribution.name, distroseries.name, source_package.name)
228 ... + source_package.name)
229 >>> new_remote_url = factory.getUniqueURL()228 >>> new_remote_url = factory.getUniqueURL()
230 >>> response = import_webservice.named_post(source_package_url,229 >>> response = import_webservice.named_post(source_package_url,
231 ... 'newCodeImport', branch_name='new-import', rcs_type='Git',230 ... 'newCodeImport', branch_name='new-import', rcs_type='Git',
diff --git a/lib/lp/registry/browser/configure.zcml b/lib/lp/registry/browser/configure.zcml
index a718640..1d1b9ea 100644
--- a/lib/lp/registry/browser/configure.zcml
+++ b/lib/lp/registry/browser/configure.zcml
@@ -99,7 +99,7 @@
99 />99 />
100 <browser:url100 <browser:url
101 for="lp.registry.interfaces.distroseries.IDistroSeries"101 for="lp.registry.interfaces.distroseries.IDistroSeries"
102 path_expression="name"102 path_expression="string:+series/${name}"
103 attribute_to_parent="distribution"103 attribute_to_parent="distribution"
104 />104 />
105 <browser:defaultView105 <browser:defaultView
diff --git a/lib/lp/registry/browser/distribution.py b/lib/lp/registry/browser/distribution.py
index 8d566e0..7876f6f 100644
--- a/lib/lp/registry/browser/distribution.py
+++ b/lib/lp/registry/browser/distribution.py
@@ -189,11 +189,6 @@ class DistributionNavigation(
189189
190 @stepthrough('+series')190 @stepthrough('+series')
191 def traverse_series(self, name):191 def traverse_series(self, name):
192 series, _ = self._resolveSeries(name)
193 return self.redirectSubTree(
194 canonical_url(series, request=self.request), status=303)
195
196 def traverse(self, name):
197 series, is_alias = self._resolveSeries(name)192 series, is_alias = self._resolveSeries(name)
198 if is_alias:193 if is_alias:
199 return self.redirectSubTree(194 return self.redirectSubTree(
@@ -201,6 +196,13 @@ class DistributionNavigation(
201 else:196 else:
202 return series197 return series
203198
199 def traverse(self, name):
200 series, _ = self._resolveSeries(name)
201 if series is None:
202 return None
203 return self.redirectSubTree(
204 canonical_url(series, request=self.request), status=303)
205
204206
205class DistributionSetNavigation(Navigation):207class DistributionSetNavigation(Navigation):
206208
diff --git a/lib/lp/registry/browser/tests/distroseries-views.txt b/lib/lp/registry/browser/tests/distroseries-views.txt
index bae1765..394798b 100644
--- a/lib/lp/registry/browser/tests/distroseries-views.txt
+++ b/lib/lp/registry/browser/tests/distroseries-views.txt
@@ -22,7 +22,7 @@ label, page_title, and cancel_url
22 Administer The Hoary Hedgehog Release22 Administer The Hoary Hedgehog Release
2323
24 >>> print view.cancel_url24 >>> print view.cancel_url
25 http://launchpad.test/ubuntu/hoary25 http://launchpad.test/ubuntu/+series/hoary
2626
27We will use a function to print the details related with the27We will use a function to print the details related with the
28distroseries being tested.28distroseries being tested.
@@ -167,7 +167,7 @@ uses the display_name, title, and description fields.
167 Edit The Hoary Hedgehog Release details167 Edit The Hoary Hedgehog Release details
168168
169 >>> print view.cancel_url169 >>> print view.cancel_url
170 http://launchpad.test/ubuntu/hoary170 http://launchpad.test/ubuntu/+series/hoary
171171
172 >>> [field.__name__ for field in view.form_fields]172 >>> [field.__name__ for field in view.form_fields]
173 ['display_name', 'title', 'summary', 'description']173 ['display_name', 'title', 'summary', 'description']
diff --git a/lib/lp/registry/browser/tests/packaging-views.txt b/lib/lp/registry/browser/tests/packaging-views.txt
index 8120834..5746a18 100644
--- a/lib/lp/registry/browser/tests/packaging-views.txt
+++ b/lib/lp/registry/browser/tests/packaging-views.txt
@@ -276,9 +276,9 @@ instead.)
276 >>> for link in table.findAll('a'):276 >>> for link in table.findAll('a'):
277 ... if '+remove-packaging' in link['href']:277 ... if '+remove-packaging' in link['href']:
278 ... print link['href']278 ... print link['href']
279 http://launchpad.test/ubuntu/grumpy/+source/hot/+remove-packaging279 http://launchpad.test/ubuntu/+series/grumpy/+source/hot/+remove-packaging
280 http://launchpad.test/ubuntu/hoary/+source/thunderbird/+remove-packaging280 http://launchpad.test/ubuntu/+series/hoary/+source/thunderbird/+remove-packaging
281 http://launchpad.test/ubuntu/hoary/+source/hot/+remove-packaging281 http://launchpad.test/ubuntu/+series/hoary/+source/hot/+remove-packaging
282282
283 >>> [hoary_package] = [283 >>> [hoary_package] = [
284 ... package for series in view.series_batch.batch284 ... package for series in view.series_batch.batch
diff --git a/lib/lp/registry/browser/tests/sourcepackage-views.txt b/lib/lp/registry/browser/tests/sourcepackage-views.txt
index d157ee5..5e74aa2 100644
--- a/lib/lp/registry/browser/tests/sourcepackage-views.txt
+++ b/lib/lp/registry/browser/tests/sourcepackage-views.txt
@@ -23,7 +23,7 @@ Edit packaging view
23 Link to an upstream project23 Link to an upstream project
2424
25 >>> print view.view.cancel_url25 >>> print view.view.cancel_url
26 http://launchpad.test/youbuntu/busy/+source/bonkers26 http://launchpad.test/youbuntu/+series/busy/+source/bonkers
2727
2828
29The view allows the logged in user to change product series field. The29The view allows the logged in user to change product series field. The
@@ -83,7 +83,7 @@ product can be chosen from a list of options.
8383
84 >>> ignored = view.view.render()84 >>> ignored = view.view.render()
85 >>> print view.view.next_url85 >>> print view.view.next_url
86 http://launchpad.test/youbuntu/busy/+source/bonkers86 http://launchpad.test/youbuntu/+series/busy/+source/bonkers
8787
88 >>> for notification in view.request.response.notifications:88 >>> for notification in view.request.response.notifications:
89 ... print notification.message89 ... print notification.message
@@ -145,7 +145,7 @@ but there is no notification message that the upstream link was updated.
145 >>> print view.view145 >>> print view.view
146 <...SourcePackageChangeUpstreamStepTwo object...>146 <...SourcePackageChangeUpstreamStepTwo object...>
147 >>> print view.view.next_url147 >>> print view.view.next_url
148 http://launchpad.test/youbuntu/busy/+source/bonkers148 http://launchpad.test/youbuntu/+series/busy/+source/bonkers
149 >>> view.view.errors149 >>> view.view.errors
150 []150 []
151151
@@ -252,7 +252,7 @@ to the +edit-packaging page where the user can search for a project.
252 >>> view.errors252 >>> view.errors
253 []253 []
254 >>> print view.next_url254 >>> print view.next_url
255 http://launchpad.test/youbuntu/busy/+source/lernid/+edit-packaging255 http://launchpad.test/youbuntu/+series/busy/+source/lernid/+edit-packaging
256256
257257
258Upstream connections view258Upstream connections view
@@ -351,7 +351,7 @@ to the project series.
351 Unlink an upstream project351 Unlink an upstream project
352352
353 >>> print view.cancel_url353 >>> print view.cancel_url
354 http://launchpad.test/youbuntu/wonky/+source/stinkypackage354 http://launchpad.test/youbuntu/+series/wonky/+source/stinkypackage
355355
356 >>> user = package.packaging.owner356 >>> user = package.packaging.owner
357 >>> ignored = login_person(user)357 >>> ignored = login_person(user)
diff --git a/lib/lp/registry/browser/tests/test_distribution.py b/lib/lp/registry/browser/tests/test_distribution.py
index d47eb99..aa7bf21 100644
--- a/lib/lp/registry/browser/tests/test_distribution.py
+++ b/lib/lp/registry/browser/tests/test_distribution.py
@@ -57,28 +57,28 @@ class TestDistributionNavigation(TestCaseWithFactory):
57 self.assertIsInstance(view, RedirectionView)57 self.assertIsInstance(view, RedirectionView)
58 self.assertEqual(expected_url, removeSecurityProxy(view).target)58 self.assertEqual(expected_url, removeSecurityProxy(view).target)
5959
60 def test_classic_series_url(self):60 def test_classic_series_url_redirects(self):
61 distroseries = self.factory.makeDistroSeries()61 distroseries = self.factory.makeDistroSeries()
62 obj, _, _ = test_traverse(62 self.assertRedirects(
63 "http://launchpad.test/%s/%s" % (63 "http://launchpad.test/%s/%s" % (
64 distroseries.distribution.name, distroseries.name),
65 "http://launchpad.test/%s/+series/%s" % (
64 distroseries.distribution.name, distroseries.name))66 distroseries.distribution.name, distroseries.name))
65 self.assertEqual(distroseries, obj)
6667
67 def test_classic_series_url_with_alias(self):68 def test_classic_series_url_with_alias_redirects(self):
68 distroseries = self.factory.makeDistroSeries()69 distroseries = self.factory.makeDistroSeries()
69 distroseries.distribution.development_series_alias = "devel"70 distroseries.distribution.development_series_alias = "devel"
70 self.assertRedirects(71 self.assertRedirects(
71 "http://launchpad.test/%s/devel" % distroseries.distribution.name,72 "http://launchpad.test/%s/devel" % distroseries.distribution.name,
72 "http://launchpad.test/%s/%s" % (73 "http://launchpad.test/%s/+series/%s" % (
73 distroseries.distribution.name, distroseries.name))74 distroseries.distribution.name, distroseries.name))
7475
75 def test_new_series_url_redirects(self):76 def test_new_series_url(self):
76 distroseries = self.factory.makeDistroSeries()77 distroseries = self.factory.makeDistroSeries()
77 self.assertRedirects(78 obj, _, _ = test_traverse(
78 "http://launchpad.test/%s/+series/%s" % (79 "http://launchpad.test/%s/+series/%s" % (
79 distroseries.distribution.name, distroseries.name),
80 "http://launchpad.test/%s/%s" % (
81 distroseries.distribution.name, distroseries.name))80 distroseries.distribution.name, distroseries.name))
81 self.assertEqual(distroseries, obj)
8282
83 def test_new_series_url_with_alias_redirects(self):83 def test_new_series_url_with_alias_redirects(self):
84 distroseries = self.factory.makeDistroSeries()84 distroseries = self.factory.makeDistroSeries()
@@ -86,7 +86,7 @@ class TestDistributionNavigation(TestCaseWithFactory):
86 self.assertRedirects(86 self.assertRedirects(
87 "http://launchpad.test/%s/+series/devel" % (87 "http://launchpad.test/%s/+series/devel" % (
88 distroseries.distribution.name),88 distroseries.distribution.name),
89 "http://launchpad.test/%s/%s" % (89 "http://launchpad.test/%s/+series/%s" % (
90 distroseries.distribution.name, distroseries.name))90 distroseries.distribution.name, distroseries.name))
9191
92 def assertDereferences(self, url, expected_obj, environ=None):92 def assertDereferences(self, url, expected_obj, environ=None):
@@ -97,33 +97,33 @@ class TestDistributionNavigation(TestCaseWithFactory):
97 self.assertIsInstance(marshaller.dereference_url(url), RedirectionView)97 self.assertIsInstance(marshaller.dereference_url(url), RedirectionView)
98 self.assertEqual(expected_obj, marshaller.marshall_from_json_data(url))98 self.assertEqual(expected_obj, marshaller.marshall_from_json_data(url))
9999
100 def test_new_series_url_supports_object_lookup(self):100 def test_classic_series_url_supports_object_lookup(self):
101 # New-style +series URLs are compatible with webservice object101 # Classic series URLs (without +series) are compatible with
102 # lookup.102 # webservice object lookup, despite redirecting.
103 distroseries = self.factory.makeDistroSeries()103 distroseries = self.factory.makeDistroSeries()
104 distroseries_url = "/%s/+series/%s" % (104 distroseries_url = "/%s/%s" % (
105 distroseries.distribution.name, distroseries.name)105 distroseries.distribution.name, distroseries.name)
106 self.assertDereferences(distroseries_url, distroseries)106 self.assertDereferences(distroseries_url, distroseries)
107107
108 # Objects subordinate to the redirected series work too.108 # Objects subordinate to the redirected series work too.
109 distroarchseries = self.factory.makeDistroArchSeries(109 distroarchseries = self.factory.makeDistroArchSeries(
110 distroseries=distroseries)110 distroseries=distroseries)
111 distroarchseries_url = "/%s/+series/%s/%s" % (111 distroarchseries_url = "/%s/%s/%s" % (
112 distroarchseries.distroseries.distribution.name,112 distroarchseries.distroseries.distribution.name,
113 distroarchseries.distroseries.name,113 distroarchseries.distroseries.name,
114 distroarchseries.architecturetag)114 distroarchseries.architecturetag)
115 self.assertDereferences(distroarchseries_url, distroarchseries)115 self.assertDereferences(distroarchseries_url, distroarchseries)
116116
117 def test_new_series_url_supports_object_lookup_https(self):117 def test_classic_series_url_supports_object_lookup_https(self):
118 # New-style +series URLs are compatible with webservice object118 # Classic series URLs (without +series) are compatible with
119 # lookup, even if the vhost is configured to use HTTPS.119 # webservice object lookup, even if the vhost is configured to use
120 # "SERVER_URL": None exposes a bug in lazr.restful < 0.22.2.120 # HTTPS. "SERVER_URL": None exposes a bug in lazr.restful < 0.22.2.
121 self.addCleanup(allvhosts.reload)121 self.addCleanup(allvhosts.reload)
122 self.pushConfig("vhosts", use_https=True)122 self.pushConfig("vhosts", use_https=True)
123 allvhosts.reload()123 allvhosts.reload()
124124
125 distroseries = self.factory.makeDistroSeries()125 distroseries = self.factory.makeDistroSeries()
126 distroseries_url = "/%s/+series/%s" % (126 distroseries_url = "/%s/%s" % (
127 distroseries.distribution.name, distroseries.name)127 distroseries.distribution.name, distroseries.name)
128 self.assertDereferences(128 self.assertDereferences(
129 distroseries_url, distroseries,129 distroseries_url, distroseries,
@@ -132,7 +132,7 @@ class TestDistributionNavigation(TestCaseWithFactory):
132 # Objects subordinate to the redirected series work too.132 # Objects subordinate to the redirected series work too.
133 distroarchseries = self.factory.makeDistroArchSeries(133 distroarchseries = self.factory.makeDistroArchSeries(
134 distroseries=distroseries)134 distroseries=distroseries)
135 distroarchseries_url = "/%s/+series/%s/%s" % (135 distroarchseries_url = "/%s/%s/%s" % (
136 distroarchseries.distroseries.distribution.name,136 distroarchseries.distroseries.distribution.name,
137 distroarchseries.distroseries.name,137 distroarchseries.distroseries.name,
138 distroarchseries.architecturetag)138 distroarchseries.architecturetag)
diff --git a/lib/lp/registry/browser/tests/test_packaging.py b/lib/lp/registry/browser/tests/test_packaging.py
index 20f68dd..d68abb2 100644
--- a/lib/lp/registry/browser/tests/test_packaging.py
+++ b/lib/lp/registry/browser/tests/test_packaging.py
@@ -95,8 +95,9 @@ class TestProductSeriesUbuntuPackagingView(WithScenarios, TestCaseWithFactory):
95 view = create_initialized_view(95 view = create_initialized_view(
96 other_productseries, '+ubuntupkg', form=form)96 other_productseries, '+ubuntupkg', form=form)
97 view_errors = [97 view_errors = [
98 'The <a href="http://launchpad.test/ubuntu/hoary/+source/hot">'98 'The '
99 'hot</a> package in Hoary is already linked to another series.']99 '<a href="http://launchpad.test/ubuntu/+series/hoary/+source/hot">'
100 'hot</a> package in Hoary is already linked to another series.']
100 self.assertEqual(view_errors, view.errors)101 self.assertEqual(view_errors, view.errors)
101102
102 def test_sourcepackagename_required(self):103 def test_sourcepackagename_required(self):
@@ -190,7 +191,7 @@ class TestBrowserDeletePackaging(TestCaseWithFactory):
190 user_browser = self.user_browser191 user_browser = self.user_browser
191 user_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils')192 user_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils')
192 link = user_browser.getLink(193 link = user_browser.getLink(
193 url='/ubuntu/warty/+source/alsa-utils/+remove-packaging')194 url='/ubuntu/+series/warty/+source/alsa-utils/+remove-packaging')
194 link.click()195 link.click()
195 user_browser.getControl('Unlink').click()196 user_browser.getControl('Unlink').click()
196 # Check that the change was committed.197 # Check that the change was committed.
diff --git a/lib/lp/registry/browser/tests/test_sourcepackage_views.py b/lib/lp/registry/browser/tests/test_sourcepackage_views.py
index c3cac87..ca41b2c 100644
--- a/lib/lp/registry/browser/tests/test_sourcepackage_views.py
+++ b/lib/lp/registry/browser/tests/test_sourcepackage_views.py
@@ -78,7 +78,7 @@ class TestSourcePackageViewHelpers(TestCaseWithFactory):
78 params = parse_qsl(query)78 params = parse_qsl(query)
79 expected_params = [79 expected_params = [
80 ('_return_url',80 ('_return_url',
81 'http://launchpad.test/zoobuntu/walrus/'81 'http://launchpad.test/zoobuntu/+series/walrus/'
82 '+source/python-super-package'),82 '+source/python-super-package'),
83 ('field.__visited_steps__', 'projectaddstep1'),83 ('field.__visited_steps__', 'projectaddstep1'),
84 ('field.actions.continue', 'Continue'),84 ('field.actions.continue', 'Continue'),
diff --git a/lib/lp/registry/stories/distribution/xx-distribution-overview.txt b/lib/lp/registry/stories/distribution/xx-distribution-overview.txt
index cb14899..cf13505 100644
--- a/lib/lp/registry/stories/distribution/xx-distribution-overview.txt
+++ b/lib/lp/registry/stories/distribution/xx-distribution-overview.txt
@@ -39,7 +39,8 @@ Some distributions have listings of major versions, for example Debian:
39If we add another milestone the list is well formatted using English grammar39If we add another milestone the list is well formatted using English grammar
40rules.40rules.
4141
42 >>> admin_browser.open("http://launchpad.test/debian/woody/+addmilestone")42 >>> admin_browser.open(
43 ... "http://launchpad.test/debian/+series/woody/+addmilestone")
43 >>> admin_browser.getControl("Name:").value = "testmilestone"44 >>> admin_browser.getControl("Name:").value = "testmilestone"
44 >>> admin_browser.getControl("Register Milestone").click()45 >>> admin_browser.getControl("Register Milestone").click()
4546
@@ -53,10 +54,10 @@ rules.
53Each series and milestone are links that take you to that54Each series and milestone are links that take you to that
54series and milestone page.55series and milestone page.
5556
56 >>> anon_browser.getLink(url='/debian/sarge').text57 >>> anon_browser.getLink(url='/debian/+series/sarge').text
57 '3.1 \xe2\x80\x9cSarge\xe2\x80\x9d series'58 '3.1 \xe2\x80\x9cSarge\xe2\x80\x9d series'
5859
59 >>> anon_browser.getLink(url='/debian/woody').text60 >>> anon_browser.getLink(url='/debian/+series/woody').text
60 '3.0 \xe2\x80\x9cWoody\xe2\x80\x9d series'61 '3.0 \xe2\x80\x9cWoody\xe2\x80\x9d series'
6162
62 >>> anon_browser.getLink(url='/debian/+milestone/3.1').text63 >>> anon_browser.getLink(url='/debian/+milestone/3.1').text
@@ -123,7 +124,7 @@ If there is a development series alias, it becomes a redirect.
123 >>> from lp.testing import celebrity_logged_in124 >>> from lp.testing import celebrity_logged_in
124 >>> from zope.component import getUtility125 >>> from zope.component import getUtility
125126
126 >>> anon_browser.open("http://launchpad.test/ubuntu/devel")127 >>> anon_browser.open("http://launchpad.test/ubuntu/+series/devel")
127 Traceback (most recent call last):128 Traceback (most recent call last):
128 ...129 ...
129 NotFound: Object: <Distribution ...>, name: u'devel'130 NotFound: Object: <Distribution ...>, name: u'devel'
@@ -131,12 +132,12 @@ If there is a development series alias, it becomes a redirect.
131 >>> with celebrity_logged_in("admin"):132 >>> with celebrity_logged_in("admin"):
132 ... ubuntu = getUtility(IDistributionSet).getByName(u"ubuntu")133 ... ubuntu = getUtility(IDistributionSet).getByName(u"ubuntu")
133 ... ubuntu.development_series_alias = "devel"134 ... ubuntu.development_series_alias = "devel"
134 >>> anon_browser.open("http://launchpad.test/ubuntu/devel")135 >>> anon_browser.open("http://launchpad.test/ubuntu/+series/devel")
135 >>> print(anon_browser.url)136 >>> print(anon_browser.url)
136 http://launchpad.test/ubuntu/hoary137 http://launchpad.test/ubuntu/+series/hoary
137 >>> anon_browser.open("http://launchpad.test/ubuntu/devel/+builds")138 >>> anon_browser.open("http://launchpad.test/ubuntu/+series/devel/+builds")
138 >>> print(anon_browser.url)139 >>> print(anon_browser.url)
139 http://launchpad.test/ubuntu/hoary/+builds140 http://launchpad.test/ubuntu/+series/hoary/+builds
140141
141142
142Registration information143Registration information
diff --git a/lib/lp/registry/stories/distroseries/distroseries-admin.txt b/lib/lp/registry/stories/distroseries/distroseries-admin.txt
index 33303f5..7619ea2 100644
--- a/lib/lp/registry/stories/distroseries/distroseries-admin.txt
+++ b/lib/lp/registry/stories/distroseries/distroseries-admin.txt
@@ -7,12 +7,12 @@ Administrators
7Launchpad administrators can edit distroseries via two different7Launchpad administrators can edit distroseries via two different
8pages: 'Change details' and 'Administer'.8pages: 'Change details' and 'Administer'.
99
10 >>> admin_browser.open('http://launchpad.test/ubuntu/hoary')10 >>> admin_browser.open('http://launchpad.test/ubuntu/+series/hoary')
11 >>> print(admin_browser.title)11 >>> print(admin_browser.title)
12 Hoary (5.04)...12 Hoary (5.04)...
13 >>> admin_browser.getLink('Change details').click()13 >>> admin_browser.getLink('Change details').click()
14 >>> print(admin_browser.url)14 >>> print(admin_browser.url)
15 http://launchpad.test/ubuntu/hoary/+edit15 http://launchpad.test/ubuntu/+series/hoary/+edit
1616
17 >>> print(admin_browser.title)17 >>> print(admin_browser.title)
18 Edit The Hoary Hedgehog Release...18 Edit The Hoary Hedgehog Release...
@@ -25,10 +25,10 @@ pages: 'Change details' and 'Administer'.
2525
26A separate administration page is available via the 'Administer' link.26A separate administration page is available via the 'Administer' link.
2727
28 >>> admin_browser.open('http://launchpad.test/ubuntu/hoary')28 >>> admin_browser.open('http://launchpad.test/ubuntu/+series/hoary')
29 >>> admin_browser.getLink('Administer').click()29 >>> admin_browser.getLink('Administer').click()
30 >>> print(admin_browser.url)30 >>> print(admin_browser.url)
31 http://launchpad.test/ubuntu/hoary/+admin31 http://launchpad.test/ubuntu/+series/hoary/+admin
3232
33 >>> print(admin_browser.title)33 >>> print(admin_browser.title)
34 Administer The Hoary Hedgehog Release...34 Administer The Hoary Hedgehog Release...
@@ -39,7 +39,7 @@ A separate administration page is available via the 'Administer' link.
39 ... 'Version', index=0).value = '5.05'39 ... 'Version', index=0).value = '5.05'
40 >>> admin_browser.getControl('Change').click()40 >>> admin_browser.getControl('Change').click()
41 >>> print(admin_browser.url)41 >>> print(admin_browser.url)
42 http://launchpad.test/ubuntu/happy42 http://launchpad.test/ubuntu/+series/happy
43 >>> print(admin_browser.title)43 >>> print(admin_browser.title)
44 Happy (5.05)...44 Happy (5.05)...
4545
@@ -54,7 +54,7 @@ Registry experts do not have access to the 'Change details' link.
54 >>> logout()54 >>> logout()
55 >>> registry_browser = setupBrowser(55 >>> registry_browser = setupBrowser(
56 ... auth='Basic %s:test' % email)56 ... auth='Basic %s:test' % email)
57 >>> registry_browser.open('http://launchpad.test/ubuntu/happy')57 >>> registry_browser.open('http://launchpad.test/ubuntu/+series/happy')
58 >>> registry_browser.getLink('Change details').click()58 >>> registry_browser.getLink('Change details').click()
59 Traceback (most recent call last):59 Traceback (most recent call last):
60 ...60 ...
@@ -62,17 +62,18 @@ Registry experts do not have access to the 'Change details' link.
6262
63And navigating directly to +edit is thwarted.63And navigating directly to +edit is thwarted.
6464
65 >>> registry_browser.open('http://launchpad.test/ubuntu/happy/+edit')65 >>> registry_browser.open(
66 ... 'http://launchpad.test/ubuntu/+series/happy/+edit')
66 Traceback (most recent call last):67 Traceback (most recent call last):
67 ...68 ...
68 Unauthorized...69 Unauthorized...
6970
70Registry experts do have access to the administration page.71Registry experts do have access to the administration page.
7172
72 >>> registry_browser.open('http://launchpad.test/ubuntu/happy')73 >>> registry_browser.open('http://launchpad.test/ubuntu/+series/happy')
73 >>> registry_browser.getLink('Administer').click()74 >>> registry_browser.getLink('Administer').click()
74 >>> print(registry_browser.url)75 >>> print(registry_browser.url)
75 http://launchpad.test/ubuntu/happy/+admin76 http://launchpad.test/ubuntu/+series/happy/+admin
7677
77 >>> print(registry_browser.title)78 >>> print(registry_browser.title)
78 Administer The Hoary Hedgehog Release...79 Administer The Hoary Hedgehog Release...
@@ -83,6 +84,6 @@ Registry experts do have access to the administration page.
83 ... 'Version', index=0).value = '5.04'84 ... 'Version', index=0).value = '5.04'
84 >>> registry_browser.getControl('Change').click()85 >>> registry_browser.getControl('Change').click()
85 >>> print(registry_browser.url)86 >>> print(registry_browser.url)
86 http://launchpad.test/ubuntu/hoary87 http://launchpad.test/ubuntu/+series/hoary
87 >>> print(registry_browser.title)88 >>> print(registry_browser.title)
88 Happy (5.04)...89 Happy (5.04)...
diff --git a/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt b/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt
index f5eaa6f..915a3a7 100644
--- a/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt
+++ b/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt
@@ -4,7 +4,7 @@ Distribution series main page
4In the main page for a distribution we have a link to help translating4In the main page for a distribution we have a link to help translating
5this distribution series.5this distribution series.
66
7 >>> user_browser.open('http://launchpad.test/ubuntu/hoary')7 >>> user_browser.open('http://launchpad.test/ubuntu/+series/hoary')
8 >>> user_browser.getLink('Help translate').click()8 >>> user_browser.getLink('Help translate').click()
9 >>> print(user_browser.title)9 >>> print(user_browser.title)
10 Hoary (5.04) : Translations : Ubuntu10 Hoary (5.04) : Translations : Ubuntu
@@ -16,7 +16,7 @@ Registering information
16The distroseries pages presents the 'registering' information besides16The distroseries pages presents the 'registering' information besides
17its main 'heading'.17its main 'heading'.
1818
19 >>> anon_browser.open('http://launchpad.test/ubuntu/warty')19 >>> anon_browser.open('http://launchpad.test/ubuntu/+series/warty')
2020
21 >>> print(extract_text(21 >>> print(extract_text(
22 ... find_tag_by_id(anon_browser.contents, 'registration')))22 ... find_tag_by_id(anon_browser.contents, 'registration')))
@@ -54,7 +54,7 @@ on the series' details.
54On series that have no source or binary packages, the portlet will54On series that have no source or binary packages, the portlet will
55change its text slightly to annouce this:55change its text slightly to annouce this:
5656
57 >>> anon_browser.open('http://launchpad.test/debian/sarge')57 >>> anon_browser.open('http://launchpad.test/debian/+series/sarge')
58 >>> print(extract_text(58 >>> print(extract_text(
59 ... find_portlet(anon_browser.contents, 'Series information')))59 ... find_portlet(anon_browser.contents, 'Series information')))
60 Series information60 Series information
@@ -93,7 +93,7 @@ the series derived from this series:
93 ... derived_series=child, parent_series=sarge)93 ... derived_series=child, parent_series=sarge)
94 ... for child in children]94 ... for child in children]
9595
96 >>> anon_browser.open('http://launchpad.test/debian/sarge')96 >>> anon_browser.open('http://launchpad.test/debian/+series/sarge')
97 >>> print(extract_text(97 >>> print(extract_text(
98 ... find_portlet(anon_browser.contents, 'Series information')))98 ... find_portlet(anon_browser.contents, 'Series information')))
99 Series information99 Series information
@@ -114,10 +114,10 @@ Distribution series bug subscriptions
114To receive email notifications about bugs pertaining to a distribution114To receive email notifications about bugs pertaining to a distribution
115series, we can create structural bug subscriptions.115series, we can create structural bug subscriptions.
116116
117 >>> admin_browser.open('http://launchpad.test/ubuntu/warty')117 >>> admin_browser.open('http://launchpad.test/ubuntu/+series/warty')
118 >>> admin_browser.getLink('Subscribe to bug mail').click()118 >>> admin_browser.getLink('Subscribe to bug mail').click()
119 >>> print(admin_browser.url)119 >>> print(admin_browser.url)
120 http://launchpad.test/ubuntu/warty/+subscribe120 http://launchpad.test/ubuntu/+series/warty/+subscribe
121121
122 >>> print(admin_browser.title)122 >>> print(admin_browser.title)
123 Subscribe : Warty (4.10) : Bugs : Ubuntu123 Subscribe : Warty (4.10) : Bugs : Ubuntu
@@ -131,7 +131,7 @@ upstream packaging.
131131
132 >>> # Note that warty's sourcecount is stale in sample data132 >>> # Note that warty's sourcecount is stale in sample data
133 >>> # which causes -2 need linking.133 >>> # which causes -2 need linking.
134 >>> anon_browser.open('http://launchpad.test/ubuntu/warty')134 >>> anon_browser.open('http://launchpad.test/ubuntu/+series/warty')
135 >>> print(extract_text(135 >>> print(extract_text(
136 ... find_tag_by_id(anon_browser.contents, 'series-packaging')))136 ... find_tag_by_id(anon_browser.contents, 'series-packaging')))
137 Upstream packaging137 Upstream packaging
diff --git a/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt b/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt
index 2ac0e42..2fa3a08 100644
--- a/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt
+++ b/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt
@@ -4,7 +4,7 @@ Distro series packaging
4The distro series packaging page is accssible to any user from the distro4The distro series packaging page is accssible to any user from the distro
5series +index page.5series +index page.
66
7 >>> anon_browser.open('http://launchpad.test/ubuntu/hoary')7 >>> anon_browser.open('http://launchpad.test/ubuntu/+series/hoary')
8 >>> anon_browser.getLink('All upstream links').click()8 >>> anon_browser.getLink('All upstream links').click()
9 >>> print(anon_browser.title)9 >>> print(anon_browser.title)
10 All upstream links : ...10 All upstream links : ...
@@ -35,7 +35,7 @@ is linked, but the link to this page is not enabled.
3535
36 >>> anon_browser.getLink('Needs upstream links')36 >>> anon_browser.getLink('Needs upstream links')
37 <Link text='Needs upstream links'37 <Link text='Needs upstream links'
38 url='http://launchpad.test/ubuntu/hoary/+needs-packaging'>38 url='http://launchpad.test/ubuntu/+series/hoary/+needs-packaging'>
3939
40 >>> anon_browser.getLink('All upstream links')40 >>> anon_browser.getLink('All upstream links')
41 Traceback (most recent call last):41 Traceback (most recent call last):
@@ -46,7 +46,8 @@ The packaging links are batched so that users can view the thousands of
46links packages. Users can also hack the URL to set their own batch size.46links packages. Users can also hack the URL to set their own batch size.
4747
48 >>> anon_browser.open(48 >>> anon_browser.open(
49 ... 'http://launchpad.test/ubuntu/hoary/+packaging?start=0&batch=1')49 ... 'http://launchpad.test/ubuntu/+series/hoary/+packaging'
50 ... '?start=0&batch=1')
50 >>> print(extract_text(find_tag_by_id(51 >>> print(extract_text(find_tag_by_id(
51 ... anon_browser.contents, 'packagings')))52 ... anon_browser.contents, 'packagings')))
52 Source Package Upstream Project Upstream Contributor Connections53 Source Package Upstream Project Upstream Contributor Connections
@@ -75,7 +76,7 @@ packages with the greatest need are listed first.
75 >>> removeSecurityProxy(dsp).bug_count = 176 >>> removeSecurityProxy(dsp).bug_count = 1
76 >>> logout()77 >>> logout()
7778
78 >>> anon_browser.open('http://launchpad.test/ubuntu/hoary')79 >>> anon_browser.open('http://launchpad.test/ubuntu/+series/hoary')
79 >>> anon_browser.getLink('Needs upstream links').click()80 >>> anon_browser.getLink('Needs upstream links').click()
80 >>> print(anon_browser.title)81 >>> print(anon_browser.title)
81 Needs upstream links : ...82 Needs upstream links : ...
@@ -94,7 +95,7 @@ pages.
9495
95 >>> anon_browser.getLink('64 strings')96 >>> anon_browser.getLink('64 strings')
96 <Link text='64 strings'97 <Link text='64 strings'
97 url='http://translations.launchpad.test/ubuntu/hoary/+source/pmount'>98 url='http://translations.launchpad.test/ubuntu/+series/hoary/+source/pmount'>
9899
99 >>> anon_browser.getLink('1 bug')100 >>> anon_browser.getLink('1 bug')
100 <Link text='1 bug'101 <Link text='1 bug'
@@ -114,7 +115,7 @@ linked, but the link to this page is not enabled.
114115
115 >>> anon_browser.getLink('All upstream links')116 >>> anon_browser.getLink('All upstream links')
116 <Link text='All upstream links'117 <Link text='All upstream links'
117 url='http://launchpad.test/ubuntu/hoary/+packaging'>118 url='http://launchpad.test/ubuntu/+series/hoary/+packaging'>
118119
119 >>> anon_browser.getLink('Needs upstream links')120 >>> anon_browser.getLink('Needs upstream links')
120 Traceback (most recent call last):121 Traceback (most recent call last):
diff --git a/lib/lp/registry/stories/milestone/object-milestones.txt b/lib/lp/registry/stories/milestone/object-milestones.txt
index 5eaf227..89a7f26 100644
--- a/lib/lp/registry/stories/milestone/object-milestones.txt
+++ b/lib/lp/registry/stories/milestone/object-milestones.txt
@@ -54,12 +54,14 @@ Distributions
54Distribution Series54Distribution Series
55...................55...................
5656
57 >>> anon_browser.open('http://launchpad.test/debian/woody/+milestones')57 >>> anon_browser.open(
58 ... 'http://launchpad.test/debian/+series/woody/+milestones')
58 >>> print(all_milestones(anon_browser))59 >>> print(all_milestones(anon_browser))
59 Debian 3.1 ...60 Debian 3.1 ...
60 Debian 3.1-rc1 ...61 Debian 3.1-rc1 ...
6162
62 >>> anon_browser.open('http://launchpad.test/debian/sarge/+milestones')63 >>> anon_browser.open(
64 ... 'http://launchpad.test/debian/+series/sarge/+milestones')
63 >>> print(all_milestones(anon_browser))65 >>> print(all_milestones(anon_browser))
64 None66 None
6567
diff --git a/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt b/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt
index d1a8eb1..4a86af3 100644
--- a/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt
+++ b/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt
@@ -3,7 +3,8 @@ add a milestone to the Ubuntu/hoary distroseries, which is owned by the Ubuntu
3Team (ubuntu-team).3Team (ubuntu-team).
44
5 >>> name12_browser = setupBrowser(auth='Basic test@canonical.com:test')5 >>> name12_browser = setupBrowser(auth='Basic test@canonical.com:test')
6 >>> name12_browser.open('http://launchpad.test/ubuntu/hoary/+addmilestone')6 >>> name12_browser.open(
7 ... 'http://launchpad.test/ubuntu/+series/hoary/+addmilestone')
7 Traceback (most recent call last):8 Traceback (most recent call last):
8 ...9 ...
9 Unauthorized: ...10 Unauthorized: ...
@@ -17,7 +18,8 @@ of the distribution should be able to add milestones for it, of course!
1718
18Now let's go back and try the add milestone page again. It works:19Now let's go back and try the add milestone page again. It works:
1920
20 >>> name12_browser.open('http://launchpad.test/ubuntu/hoary/+addmilestone')21 >>> name12_browser.open(
22 ... 'http://launchpad.test/ubuntu/+series/hoary/+addmilestone')
2123
22Now, if we post to that form, we should see a success, and the page should24Now, if we post to that form, we should see a success, and the page should
23redirect to the Ubuntu Hoary page showing the milestone we added.25redirect to the Ubuntu Hoary page showing the milestone we added.
@@ -25,7 +27,7 @@ redirect to the Ubuntu Hoary page showing the milestone we added.
25 >>> name12_browser.getControl('Name').value = 'sounder01'27 >>> name12_browser.getControl('Name').value = 'sounder01'
26 >>> name12_browser.getControl('Register Milestone').click()28 >>> name12_browser.getControl('Register Milestone').click()
27 >>> name12_browser.url29 >>> name12_browser.url
28 'http://launchpad.test/ubuntu/hoary'30 'http://launchpad.test/ubuntu/+series/hoary'
29 >>> print(extract_text(31 >>> print(extract_text(
30 ... find_tag_by_id(name12_browser.contents, 'series-hoary')))32 ... find_tag_by_id(name12_browser.contents, 'series-hoary')))
31 Version ...33 Version ...
diff --git a/lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt b/lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt
index 2a229aa..2e57645 100644
--- a/lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt
+++ b/lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt
@@ -38,12 +38,13 @@ see the link to add a milestone nor access the page directly.
38 ...38 ...
39 Unauthorized: ...39 Unauthorized: ...
4040
41 >>> user_browser.open('http://launchpad.test/ubuntu/hoary')41 >>> user_browser.open('http://launchpad.test/ubuntu/+series/hoary')
42 >>> user_browser.getLink('Create milestone').click()42 >>> user_browser.getLink('Create milestone').click()
43 Traceback (most recent call last):43 Traceback (most recent call last):
44 ...44 ...
45 LinkNotFoundError45 LinkNotFoundError
46 >>> user_browser.open('http://launchpad.test/ubuntu/hoary/+addmilestone')46 >>> user_browser.open(
47 ... 'http://launchpad.test/ubuntu/+series/hoary/+addmilestone')
47 Traceback (most recent call last):48 Traceback (most recent call last):
48 ...49 ...
49 Unauthorized: ...50 Unauthorized: ...
@@ -57,10 +58,10 @@ create a new milestone.
57 >>> test_browser.url58 >>> test_browser.url
58 'http://launchpad.test/alsa-utils/trunk/+addmilestone'59 'http://launchpad.test/alsa-utils/trunk/+addmilestone'
5960
60 >>> test_browser.open('http://launchpad.test/ubuntu/hoary')61 >>> test_browser.open('http://launchpad.test/ubuntu/+series/hoary')
61 >>> test_browser.getLink('Create milestone').click()62 >>> test_browser.getLink('Create milestone').click()
62 >>> test_browser.url63 >>> test_browser.url
63 'http://launchpad.test/ubuntu/hoary/+addmilestone'64 'http://launchpad.test/ubuntu/+series/hoary/+addmilestone'
6465
6566
66== Milestone bug subscriptions ==67== Milestone bug subscriptions ==
diff --git a/lib/lp/registry/stories/milestone/xx-milestone-description.txt b/lib/lp/registry/stories/milestone/xx-milestone-description.txt
index d131f2b..cc59256 100644
--- a/lib/lp/registry/stories/milestone/xx-milestone-description.txt
+++ b/lib/lp/registry/stories/milestone/xx-milestone-description.txt
@@ -18,7 +18,8 @@ Let's make the sample user the owner of Ubuntu and alsa-utils for this test.
1818
19We can set the summary while creating a milestone for a Distribution.19We can set the summary while creating a milestone for a Distribution.
2020
21 >>> test_browser.open('http://launchpad.test/ubuntu/hoary/+addmilestone')21 >>> test_browser.open(
22 ... 'http://launchpad.test/ubuntu/+series/hoary/+addmilestone')
22 >>> test_browser.getControl('Name').value = 'milestone1'23 >>> test_browser.getControl('Name').value = 'milestone1'
23 >>> test_browser.getControl('Summary').value = (24 >>> test_browser.getControl('Summary').value = (
24 ... "Summary of first Ubuntu milestone.")25 ... "Summary of first Ubuntu milestone.")
diff --git a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt
index dcccb46..eb48805 100644
--- a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt
+++ b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt
@@ -17,7 +17,7 @@ Then the user click the "Delete Link" button in the first tab. The
17deletion succeeds and the usual informational message is displayed.17deletion succeeds and the usual informational message is displayed.
1818
19 >>> link = first_browser.getLink(19 >>> link = first_browser.getLink(
20 ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging')20 ... url='/ubuntu/+series/warty/+source/alsa-utils/+remove-packaging')
21 >>> link.click()21 >>> link.click()
22 >>> first_browser.getControl('Unlink').click()22 >>> first_browser.getControl('Unlink').click()
23 >>> content = first_browser.contents23 >>> content = first_browser.contents
@@ -33,8 +33,9 @@ second tab, and clicks the "Delete Link" button again.
33The packaging object has been deleted already, so this action cannot33The packaging object has been deleted already, so this action cannot
34succeed.34succeed.
3535
36 >>> second_browser.getLink(36 >>> link = second_browser.getLink(
37 ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging').click()37 ... url='/ubuntu/+series/warty/+source/alsa-utils/+remove-packaging')
38 >>> link.click()
38 >>> content = second_browser.contents39 >>> content = second_browser.contents
39 >>> for tag in find_tags_by_class(content, 'informational'):40 >>> for tag in find_tags_by_class(content, 'informational'):
40 ... print(extract_text(tag))41 ... print(extract_text(tag))
diff --git a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt
index a1f0e86..4b9961a 100644
--- a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt
+++ b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt
@@ -34,7 +34,7 @@ packaging links.
34 >>> user_browser = setupBrowser(auth='Basic test@canonical.com:test')34 >>> user_browser = setupBrowser(auth='Basic test@canonical.com:test')
35 >>> user_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils')35 >>> user_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils')
36 >>> link = user_browser.getLink(36 >>> link = user_browser.getLink(
37 ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging')37 ... url='/ubuntu/+series/warty/+source/alsa-utils/+remove-packaging')
38 >>> print(link)38 >>> print(link)
39 <Link text='Remove upstream link'...39 <Link text='Remove upstream link'...
4040
@@ -49,7 +49,7 @@ This button is not displayed to anonymous users.
49Clicking this button deletes the corresponding packaging association.49Clicking this button deletes the corresponding packaging association.
5050
51 >>> link = user_browser.getLink(51 >>> link = user_browser.getLink(
52 ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging')52 ... url='/ubuntu/+series/warty/+source/alsa-utils/+remove-packaging')
53 >>> link.click()53 >>> link.click()
54 >>> user_browser.getControl('Unlink').click()54 >>> user_browser.getControl('Unlink').click()
55 >>> content = user_browser.contents55 >>> content = user_browser.contents
diff --git a/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt b/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt
index 0457b89..e0abe77 100644
--- a/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt
+++ b/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt
@@ -14,7 +14,7 @@ No Privileges Person visit the distroseries upstream links page for Hoary
14and sees that pmount is not linked.14and sees that pmount is not linked.
1515
16 >>> user_browser.open(16 >>> user_browser.open(
17 ... 'http://launchpad.test/ubuntu/hoary/+needs-packaging')17 ... 'http://launchpad.test/ubuntu/+series/hoary/+needs-packaging')
18 >>> print(extract_text(find_tag_by_id(user_browser.contents, 'packages')))18 >>> print(extract_text(find_tag_by_id(user_browser.contents, 'packages')))
19 Source Package Bugs Translations19 Source Package Bugs Translations
20 pmount No bugs 64 strings ...20 pmount No bugs 64 strings ...
@@ -75,7 +75,7 @@ will use the data from the source package to prefill the first
75step of the multistep form.75step of the multistep form.
7676
77 >>> user_browser.open(77 >>> user_browser.open(
78 ... 'http://launchpad.test/youbuntu/busy/+source/bonkers')78 ... 'http://launchpad.test/youbuntu/+series/busy/+source/bonkers')
79 >>> user_browser.getControl(79 >>> user_browser.getControl(
80 ... 'Register the upstream project').selected = True80 ... 'Register the upstream project').selected = True
81 >>> user_browser.getControl("Link to Upstream Project").click()81 >>> user_browser.getControl("Link to Upstream Project").click()
@@ -95,12 +95,12 @@ then finds out that the project doesn't exist, they use the
95"Link to Upstream Project" button to register the project.95"Link to Upstream Project" button to register the project.
9696
97 >>> user_browser.open(97 >>> user_browser.open(
98 ... 'http://launchpad.test/youbuntu/busy/+source/bonkers/')98 ... 'http://launchpad.test/youbuntu/+series/busy/+source/bonkers/')
99 >>> user_browser.getControl(99 >>> user_browser.getControl(
100 ... 'Choose another upstream project').selected = True100 ... 'Choose another upstream project').selected = True
101 >>> user_browser.getControl("Link to Upstream Project").click()101 >>> user_browser.getControl("Link to Upstream Project").click()
102 >>> print(user_browser.url)102 >>> print(user_browser.url)
103 http://launchpad.test/youbuntu/busy/+source/bonkers/+edit-packaging103 http://launchpad.test/youbuntu/+series/busy/+source/bonkers/+edit-packaging
104104
105 >>> user_browser.getLink("Register the upstream project").click()105 >>> user_browser.getLink("Register the upstream project").click()
106 >>> print(user_browser.getControl(name='field.name').value)106 >>> print(user_browser.getControl(name='field.name').value)
@@ -121,7 +121,7 @@ to the source package page and an informational message will be displayed.
121 >>> user_browser.getControl(121 >>> user_browser.getControl(
122 ... "Complete registration and link to bonkers package").click()122 ... "Complete registration and link to bonkers package").click()
123 >>> print(user_browser.url)123 >>> print(user_browser.url)
124 http://launchpad.test/youbuntu/busy/+source/bonkers124 http://launchpad.test/youbuntu/+series/busy/+source/bonkers
125 >>> for tag in find_tags_by_class(125 >>> for tag in find_tags_by_class(
126 ... user_browser.contents, 'informational message'):126 ... user_browser.contents, 'informational message'):
127 ... print(extract_text(tag))127 ... print(extract_text(tag))
diff --git a/lib/lp/registry/stories/person/xx-deactivate-account.txt b/lib/lp/registry/stories/person/xx-deactivate-account.txt
index 9b41ec4..fceff3b 100644
--- a/lib/lp/registry/stories/person/xx-deactivate-account.txt
+++ b/lib/lp/registry/stories/person/xx-deactivate-account.txt
@@ -10,7 +10,8 @@ demonstrate this, we'll assign a bug to the user that we're going to
10deactivate.10deactivate.
1111
12 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')12 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')
13 >>> edit_bug_url = ("http://bugs.launchpad.test/debian/sarge/+source/"13 >>> edit_bug_url = (
14 ... "http://bugs.launchpad.test/debian/+series/sarge/+source/"
14 ... "mozilla-firefox/+bug/3/+editstatus")15 ... "mozilla-firefox/+bug/3/+editstatus")
15 >>> browser.open(edit_bug_url)16 >>> browser.open(edit_bug_url)
16 >>> bugwatch_control = browser.getControl(17 >>> bugwatch_control = browser.getControl(
diff --git a/lib/lp/registry/stories/product/xx-product-package-pages.txt b/lib/lp/registry/stories/product/xx-product-package-pages.txt
index 54261e5..3d7c44e 100644
--- a/lib/lp/registry/stories/product/xx-product-package-pages.txt
+++ b/lib/lp/registry/stories/product/xx-product-package-pages.txt
@@ -13,7 +13,8 @@ each.
13 Distribution series Source package Version Project series13 Distribution series Source package Version Project series
14 Warty (4.10) evolution Evolution trunk series ...14 Warty (4.10) evolution Evolution trunk series ...
1515
16 >>> anon_browser.getLink(url='/ubuntu/warty/+source/evolution').click()16 >>> anon_browser.getLink(
17 ... url='/ubuntu/+series/warty/+source/evolution').click()
17 >>> print(extract_text(18 >>> print(extract_text(
18 ... find_tag_by_id(anon_browser.contents, 'maincontent').h1))19 ... find_tag_by_id(anon_browser.contents, 'maincontent').h1))
19 evolution source package in Warty20 evolution source package in Warty
@@ -33,7 +34,8 @@ Evolution.
33 Ubuntu Warty (4.10) evolution Remove...34 Ubuntu Warty (4.10) evolution Remove...
34 Ubuntu Hoary (5.04) evolution 1.0 Remove...35 Ubuntu Hoary (5.04) evolution 1.0 Remove...
3536
36 >>> evo_owner.getLink(url='/ubuntu/hoary/+source/evolution') is not None37 >>> evo_owner.getLink(
38 ... url='/ubuntu/+series/hoary/+source/evolution') is not None
37 True39 True
3840
39Any logged in users can still see the links to create a packaging link.41Any logged in users can still see the links to create a packaging link.
@@ -54,8 +56,9 @@ Deleting packaging links
5456
55Packaging links can be deleted if they were created in error.57Packaging links can be deleted if they were created in error.
5658
57 >>> evo_owner.getLink(59 >>> link = evo_owner.getLink(
58 ... url='/ubuntu/warty/+source/evolution/+remove-packaging').click()60 ... url='/ubuntu/+series/warty/+source/evolution/+remove-packaging')
61 >>> link.click()
59 >>> print(evo_owner.title)62 >>> print(evo_owner.title)
60 Unlink an upstream project...63 Unlink an upstream project...
61 >>> evo_owner.getControl('Unlink').click()64 >>> evo_owner.getControl('Unlink').click()
diff --git a/lib/lp/registry/stories/productseries/xx-productseries-delete.txt b/lib/lp/registry/stories/productseries/xx-productseries-delete.txt
index b1c867d..c210700 100644
--- a/lib/lp/registry/stories/productseries/xx-productseries-delete.txt
+++ b/lib/lp/registry/stories/productseries/xx-productseries-delete.txt
@@ -47,7 +47,9 @@ bogus.
4747
48 >>> owner_browser.getLink('All packages').click()48 >>> owner_browser.getLink('All packages').click()
49 >>> link = owner_browser.getLink(49 >>> link = owner_browser.getLink(
50 ... url='/ubuntu/warty/+source/mozilla-firefox/+remove-packaging')50 ... url=(
51 ... '/ubuntu/+series/warty/+source/mozilla-firefox/'
52 ... '+remove-packaging'))
51 >>> link.click()53 >>> link.click()
52 >>> owner_browser.getControl('Unlink').click()54 >>> owner_browser.getControl('Unlink').click()
5355
diff --git a/lib/lp/registry/stories/productseries/xx-productseries-index.txt b/lib/lp/registry/stories/productseries/xx-productseries-index.txt
index 7a4470c..3cfc7fc 100644
--- a/lib/lp/registry/stories/productseries/xx-productseries-index.txt
+++ b/lib/lp/registry/stories/productseries/xx-productseries-index.txt
@@ -120,7 +120,7 @@ in each Ubuntu series.
120 Ubuntu Warty mozilla-firefox120 Ubuntu Warty mozilla-firefox
121121
122 >>> anon_browser.getLink('Ubuntu Warty mozilla-firefox')122 >>> anon_browser.getLink('Ubuntu Warty mozilla-firefox')
123 <Link ... url='http://launchpad.test/ubuntu/warty/+source/mozilla-firefox'>123 <Link ... url='http://launchpad.test/ubuntu/+series/warty/+source/mozilla-firefox'>
124124
125If there are no sourcepackages, any user can see there are none:125If there are no sourcepackages, any user can see there are none:
126126
diff --git a/lib/lp/registry/stories/webservice/xx-distribution.txt b/lib/lp/registry/stories/webservice/xx-distribution.txt
index a578671..f4358f5 100644
--- a/lib/lp/registry/stories/webservice/xx-distribution.txt
+++ b/lib/lp/registry/stories/webservice/xx-distribution.txt
@@ -28,7 +28,7 @@ And for every distribution we publish most of its attributes.
28 bug_reporting_guidelines: None28 bug_reporting_guidelines: None
29 bug_supervisor_link: None29 bug_supervisor_link: None
30 cdimage_mirrors_collection_link: 'http://.../ubuntu/cdimage_mirrors'30 cdimage_mirrors_collection_link: 'http://.../ubuntu/cdimage_mirrors'
31 current_series_link: 'http://.../ubuntu/hoary'31 current_series_link: 'http://.../ubuntu/+series/hoary'
32 date_created: '2006-10-16T18:31:43.415195+00:00'32 date_created: '2006-10-16T18:31:43.415195+00:00'
33 derivatives_collection_link: 'http://.../ubuntu/derivatives'33 derivatives_collection_link: 'http://.../ubuntu/derivatives'
34 description: 'Ubuntu is a new approach...'34 description: 'Ubuntu is a new approach...'
@@ -76,7 +76,7 @@ Distribution has some custom operations.
76 ... ubuntu['self_link'], 'getSeries',76 ... ubuntu['self_link'], 'getSeries',
77 ... name_or_version='hoary').jsonBody()77 ... name_or_version='hoary').jsonBody()
78 >>> print(series['self_link'])78 >>> print(series['self_link'])
79 http://.../ubuntu/hoary79 http://.../ubuntu/+series/hoary
8080
81Requesting a series that does not exist is results in a not found error.81Requesting a series that does not exist is results in a not found error.
8282
@@ -94,7 +94,7 @@ distribution that are marked as in development.
94 ... ubuntu['self_link'], 'getDevelopmentSeries').jsonBody()94 ... ubuntu['self_link'], 'getDevelopmentSeries').jsonBody()
95 >>> for entry in sorted(dev_series['entries']):95 >>> for entry in sorted(dev_series['entries']):
96 ... print(entry['self_link'])96 ... print(entry['self_link'])
97 http://.../ubuntu/hoary97 http://.../ubuntu/+series/hoary
9898
99"getMilestone" returns a milestone for the given name, or None if there99"getMilestone" returns a milestone for the given name, or None if there
100is no milestone for the given name.100is no milestone for the given name.
diff --git a/lib/lp/registry/stories/webservice/xx-distroseries.txt b/lib/lp/registry/stories/webservice/xx-distroseries.txt
index e6ad345..96343b9 100644
--- a/lib/lp/registry/stories/webservice/xx-distroseries.txt
+++ b/lib/lp/registry/stories/webservice/xx-distroseries.txt
@@ -14,10 +14,10 @@ Via all the available series:
14 ... ubuntu['series_collection_link']).jsonBody()14 ... ubuntu['series_collection_link']).jsonBody()
15 >>> for entry in all_series['entries']:15 >>> for entry in all_series['entries']:
16 ... print(entry['self_link'])16 ... print(entry['self_link'])
17 http://.../ubuntu/breezy-autotest17 http://.../ubuntu/+series/breezy-autotest
18 http://.../ubuntu/grumpy18 http://.../ubuntu/+series/grumpy
19 http://.../ubuntu/hoary19 http://.../ubuntu/+series/hoary
20 http://.../ubuntu/warty20 http://.../ubuntu/+series/warty
2121
22The series are available to the anonymous API user too:22The series are available to the anonymous API user too:
2323
@@ -25,17 +25,17 @@ The series are available to the anonymous API user too:
25 ... ubuntu['series_collection_link']).jsonBody()25 ... ubuntu['series_collection_link']).jsonBody()
26 >>> for entry in all_series['entries']:26 >>> for entry in all_series['entries']:
27 ... print(entry['self_link'])27 ... print(entry['self_link'])
28 http://.../ubuntu/breezy-autotest28 http://.../ubuntu/+series/breezy-autotest
29 http://.../ubuntu/grumpy29 http://.../ubuntu/+series/grumpy
30 http://.../ubuntu/hoary30 http://.../ubuntu/+series/hoary
31 http://.../ubuntu/warty31 http://.../ubuntu/+series/warty
3232
33Via the current series:33Via the current series:
3434
35 >>> current_series = webservice.get(35 >>> current_series = webservice.get(
36 ... ubuntu['current_series_link']).jsonBody()36 ... ubuntu['current_series_link']).jsonBody()
37 >>> print(current_series['self_link'])37 >>> print(current_series['self_link'])
38 http://.../ubuntu/hoary38 http://.../ubuntu/+series/hoary
3939
40Via the collection of development series:40Via the collection of development series:
4141
@@ -43,7 +43,7 @@ Via the collection of development series:
43 ... ubuntu['self_link'], 'getDevelopmentSeries').jsonBody()43 ... ubuntu['self_link'], 'getDevelopmentSeries').jsonBody()
44 >>> for entry in sorted(dev_series['entries']):44 >>> for entry in sorted(dev_series['entries']):
45 ... print(entry['self_link'])45 ... print(entry['self_link'])
46 http://.../ubuntu/hoary46 http://.../ubuntu/+series/hoary
4747
48And via a direct query of a named series:48And via a direct query of a named series:
4949
@@ -51,7 +51,7 @@ And via a direct query of a named series:
51 ... ubuntu['self_link'], 'getSeries',51 ... ubuntu['self_link'], 'getSeries',
52 ... name_or_version='hoary').jsonBody()52 ... name_or_version='hoary').jsonBody()
53 >>> print(series['self_link'])53 >>> print(series['self_link'])
54 http://.../ubuntu/hoary54 http://.../ubuntu/+series/hoary
5555
56For distroseries we publish a subset of its attributes.56For distroseries we publish a subset of its attributes.
5757
@@ -59,10 +59,12 @@ For distroseries we publish a subset of its attributes.
59 >>> pprint_entry(current_series)59 >>> pprint_entry(current_series)
60 active: True60 active: True
61 active_milestones_collection_link:61 active_milestones_collection_link:
62 'http://.../ubuntu/hoary/active_milestones'62 'http://.../ubuntu/+series/hoary/active_milestones'
63 advertise_by_hash: False63 advertise_by_hash: False
64 all_milestones_collection_link: 'http://.../ubuntu/hoary/all_milestones'64 all_milestones_collection_link:
65 architectures_collection_link: 'http://.../ubuntu/hoary/architectures'65 'http://.../ubuntu/+series/hoary/all_milestones'
66 architectures_collection_link:
67 'http://.../ubuntu/+series/hoary/architectures'
66 bug_reported_acknowledgement: None68 bug_reported_acknowledgement: None
67 bug_reporting_guidelines: None69 bug_reporting_guidelines: None
68 changeslist: 'hoary-changes@ubuntu.com'70 changeslist: 'hoary-changes@ubuntu.com'
@@ -73,21 +75,21 @@ For distroseries we publish a subset of its attributes.
73 displayname: 'Hoary'75 displayname: 'Hoary'
74 distribution_link: 'http://.../ubuntu'76 distribution_link: 'http://.../ubuntu'
75 driver_link: None77 driver_link: None
76 drivers_collection_link: 'http://.../ubuntu/hoary/drivers'78 drivers_collection_link: 'http://.../ubuntu/+series/hoary/drivers'
77 fullseriesname: 'Ubuntu Hoary'79 fullseriesname: 'Ubuntu Hoary'
78 include_long_descriptions: True80 include_long_descriptions: True
79 index_compressors: [u'gzip', u'bzip2']81 index_compressors: [u'gzip', u'bzip2']
80 language_pack_full_export_requested: False82 language_pack_full_export_requested: False
81 main_archive_link: 'http://.../ubuntu/+archive/primary'83 main_archive_link: 'http://.../ubuntu/+archive/primary'
82 name: 'hoary'84 name: 'hoary'
83 nominatedarchindep_link: 'http://.../ubuntu/hoary/i386'85 nominatedarchindep_link: 'http://.../ubuntu/+series/hoary/i386'
84 official_bug_tags: []86 official_bug_tags: []
85 owner_link: 'http://.../~ubuntu-team'87 owner_link: 'http://.../~ubuntu-team'
86 parent_series_link: 'http://.../ubuntu/warty'88 parent_series_link: 'http://.../ubuntu/+series/warty'
87 publish_by_hash: False89 publish_by_hash: False
88 registrant_link: 'http://.../~mark'90 registrant_link: 'http://.../~mark'
89 resource_type_link: ...91 resource_type_link: ...
90 self_link: 'http://.../ubuntu/hoary'92 self_link: 'http://.../ubuntu/+series/hoary'
91 status: 'Active Development'93 status: 'Active Development'
92 suite_names:94 suite_names:
93 [u'Release', u'Security', u'Updates', u'Proposed', u'Backports']95 [u'Release', u'Security', u'Updates', u'Proposed', u'Backports']
@@ -95,7 +97,7 @@ For distroseries we publish a subset of its attributes.
95 supported: False97 supported: False
96 title: 'The Hoary Hedgehog Release'98 title: 'The Hoary Hedgehog Release'
97 version: '5.04'99 version: '5.04'
98 web_link: 'http://launchpad.../ubuntu/hoary'100 web_link: 'http://launchpad.../ubuntu/+series/hoary'
99101
100102
101Getting the previous series103Getting the previous series
@@ -105,25 +107,25 @@ In the beta version of the API the previous series is obtained via
105parent_series_link:107parent_series_link:
106108
107 >>> current_series_beta = webservice.get(109 >>> current_series_beta = webservice.get(
108 ... "/ubuntu/hoary", api_version="beta").jsonBody()110 ... "/ubuntu/+series/hoary", api_version="beta").jsonBody()
109 >>> current_series_beta["parent_series_link"]111 >>> current_series_beta["parent_series_link"]
110 u'http://.../ubuntu/warty'112 u'http://.../ubuntu/+series/warty'
111113
112In the 1.0 version of the API the previous series is obtained via114In the 1.0 version of the API the previous series is obtained via
113parent_series_link:115parent_series_link:
114116
115 >>> current_series_1_0 = webservice.get(117 >>> current_series_1_0 = webservice.get(
116 ... "/ubuntu/hoary", api_version="1.0").jsonBody()118 ... "/ubuntu/+series/hoary", api_version="1.0").jsonBody()
117 >>> current_series_1_0["parent_series_link"]119 >>> current_series_1_0["parent_series_link"]
118 u'http://.../ubuntu/warty'120 u'http://.../ubuntu/+series/warty'
119121
120In the devel version of the API the previous series is obtained via122In the devel version of the API the previous series is obtained via
121parent_series_link:123parent_series_link:
122124
123 >>> current_series_devel = webservice.get(125 >>> current_series_devel = webservice.get(
124 ... "/ubuntu/hoary", api_version="devel").jsonBody()126 ... "/ubuntu/+series/hoary", api_version="devel").jsonBody()
125 >>> current_series_devel["previous_series_link"]127 >>> current_series_devel["previous_series_link"]
126 u'http://.../ubuntu/warty'128 u'http://.../ubuntu/+series/warty'
127129
128130
129Creating a milestone on the distroseries131Creating a milestone on the distroseries
diff --git a/lib/lp/registry/stories/webservice/xx-source-package.txt b/lib/lp/registry/stories/webservice/xx-source-package.txt
index 79b2402..435cf94 100644
--- a/lib/lp/registry/stories/webservice/xx-source-package.txt
+++ b/lib/lp/registry/stories/webservice/xx-source-package.txt
@@ -20,7 +20,7 @@ Getting source packages
20We can get source packages that are bound to a distribution series from the20We can get source packages that are bound to a distribution series from the
21distribution series.21distribution series.
2222
23 >>> my_series = webservice.get('/my-distro/my-series').jsonBody()23 >>> my_series = webservice.get('/my-distro/+series/my-series').jsonBody()
24 >>> evolution = webservice.named_get(24 >>> evolution = webservice.named_get(
25 ... my_series['self_link'], 'getSourcePackage',25 ... my_series['self_link'], 'getSourcePackage',
26 ... name='evolution').jsonBody()26 ... name='evolution').jsonBody()
@@ -31,13 +31,13 @@ distribution series.
31 bug_reporting_guidelines: None31 bug_reporting_guidelines: None
32 displayname: 'evolution in My-distro My-series'32 displayname: 'evolution in My-distro My-series'
33 distribution_link: 'http://.../my-distro'33 distribution_link: 'http://.../my-distro'
34 distroseries_link: 'http://.../my-distro/my-series'34 distroseries_link: 'http://.../my-distro/+series/my-series'
35 latest_published_component_name: None35 latest_published_component_name: None
36 name: 'evolution'36 name: 'evolution'
37 official_bug_tags: []37 official_bug_tags: []
38 productseries_link: None38 productseries_link: None
39 resource_type_link: ...39 resource_type_link: ...
40 self_link: 'http://api.../my-distro/my-series/+source/evolution'40 self_link: 'http://api.../my-distro/+series/my-series/+source/evolution'
41 web_link: 'http://.../+source/evolution'41 web_link: 'http://.../+source/evolution'
4242
4343
diff --git a/lib/lp/services/feeds/stories/xx-links.txt b/lib/lp/services/feeds/stories/xx-links.txt
index 6f0b0ba..c8243d3 100644
--- a/lib/lp/services/feeds/stories/xx-links.txt
+++ b/lib/lp/services/feeds/stories/xx-links.txt
@@ -257,11 +257,11 @@ Only bug feeds should be linked to on bugs.launchpad.test.
257On the distroseries page on bugs.launchpad.test, we should257On the distroseries page on bugs.launchpad.test, we should
258show a link to the atom feed for that distroseries' latest bugs.258show a link to the atom feed for that distroseries' latest bugs.
259259
260 >>> browser.open('http://bugs.launchpad.test/ubuntu/hoary')260 >>> browser.open('http://bugs.launchpad.test/ubuntu/+series/hoary')
261 >>> soup = BeautifulSoup(browser.contents)261 >>> soup = BeautifulSoup(browser.contents)
262 >>> soup.head.findAll('link', type='application/atom+xml')262 >>> soup.head.findAll('link', type='application/atom+xml')
263 [<link263 [<link
264 href="http://feeds.launchpad.test/ubuntu/hoary/latest-bugs.atom"264 href="http://feeds.launchpad.test/ubuntu/+series/hoary/latest-bugs.atom"
265 rel="alternate" title="Latest Bugs for Hoary"265 rel="alternate" title="Latest Bugs for Hoary"
266 type="application/atom+xml"/>]266 type="application/atom+xml"/>]
267267
diff --git a/lib/lp/services/sitesearch/tests/data/bingsearchservice-bugs-2.json b/lib/lp/services/sitesearch/tests/data/bingsearchservice-bugs-2.json
index 8cab9aa..a2b9246 100644
--- a/lib/lp/services/sitesearch/tests/data/bingsearchservice-bugs-2.json
+++ b/lib/lp/services/sitesearch/tests/data/bingsearchservice-bugs-2.json
@@ -15,7 +15,7 @@
15 {15 {
16 "id": "https://api.cognitive.microsoft.com/api/v7/#WebPages.0",16 "id": "https://api.cognitive.microsoft.com/api/v7/#WebPages.0",
17 "name": "Bug #2 in Ubuntu Hoary: ā€œBlackhole Trash folderā€",17 "name": "Bug #2 in Ubuntu Hoary: ā€œBlackhole Trash folderā€",
18 "url": "http://bugs.launchpad.test/ubuntu/hoary/+bug/2",18 "url": "http://bugs.launchpad.test/ubuntu/+series/hoary/+bug/2",
19 "urlPingSuffix": "DevEx,5103.1",19 "urlPingSuffix": "DevEx,5103.1",
20 "isFamilyFriendly": true,20 "isFamilyFriendly": true,
21 "displayUrl": "https://help.launchpad.net/Bugs",21 "displayUrl": "https://help.launchpad.net/Bugs",
diff --git a/lib/lp/services/sitesearch/tests/test_bing.py b/lib/lp/services/sitesearch/tests/test_bing.py
index 61d623e..094bb87 100644
--- a/lib/lp/services/sitesearch/tests/test_bing.py
+++ b/lib/lp/services/sitesearch/tests/test_bing.py
@@ -267,7 +267,7 @@ class TestBingSearchService(TestCase):
267 self.assertEqual(25, matches.total)267 self.assertEqual(25, matches.total)
268 self.assertEqual(5, len(matches))268 self.assertEqual(5, len(matches))
269 self.assertEqual([269 self.assertEqual([
270 'http://bugs.launchpad.test/ubuntu/hoary/+bug/2',270 'http://bugs.launchpad.test/ubuntu/+series/hoary/+bug/2',
271 'http://bugs.launchpad.test/debian/+source/mozilla-firefox/+bug/2',271 'http://bugs.launchpad.test/debian/+source/mozilla-firefox/+bug/2',
272 'http://bugs.launchpad.test/debian/+source/mozilla-firefox/+bug/3',272 'http://bugs.launchpad.test/debian/+source/mozilla-firefox/+bug/3',
273 'http://bugs.launchpad.test/bugs/bugtrackers',273 'http://bugs.launchpad.test/bugs/bugtrackers',
diff --git a/lib/lp/services/webapp/doc/canonical_url_examples.txt b/lib/lp/services/webapp/doc/canonical_url_examples.txt
index 6db9c6a..fcbe49d 100644
--- a/lib/lp/services/webapp/doc/canonical_url_examples.txt
+++ b/lib/lp/services/webapp/doc/canonical_url_examples.txt
@@ -119,12 +119,12 @@ An IDistroSeries.
119119
120 >>> hoary = celebs.ubuntu.getSeries('hoary')120 >>> hoary = celebs.ubuntu.getSeries('hoary')
121 >>> canonical_url(hoary)121 >>> canonical_url(hoary)
122 u'http://launchpad.test/ubuntu/hoary'122 u'http://launchpad.test/ubuntu/+series/hoary'
123123
124An ISourcePackage.124An ISourcePackage.
125125
126 >>> canonical_url(hoary.getSourcePackage('evolution'))126 >>> canonical_url(hoary.getSourcePackage('evolution'))
127 u'http://launchpad.test/ubuntu/hoary/+source/evolution'127 u'http://launchpad.test/ubuntu/+series/hoary/+source/evolution'
128128
129An IDistributionSourcePackage.129An IDistributionSourcePackage.
130130
@@ -231,7 +231,7 @@ An IBugTask on a distribution series source package.
231231
232 >>> distro_series_task = getUtility(IBugTaskSet).get(19)232 >>> distro_series_task = getUtility(IBugTaskSet).get(19)
233 >>> canonical_url(distro_series_task)233 >>> canonical_url(distro_series_task)
234 u'http://bugs.launchpad.test/debian/sarge/+source/mozilla-firefox/+bug/3'234 u'http://bugs.launchpad.test/debian/+series/sarge/+source/mozilla-firefox/+bug/3'
235235
236An IBugTask on a distribution series without a sourcepackage.236An IBugTask on a distribution series without a sourcepackage.
237237
@@ -239,7 +239,7 @@ An IBugTask on a distribution series without a sourcepackage.
239 >>> distro_series_task.transitionToTarget(239 >>> distro_series_task.transitionToTarget(
240 ... distro_series_task.target.distroseries, getUtility(ILaunchBag).user)240 ... distro_series_task.target.distroseries, getUtility(ILaunchBag).user)
241 >>> canonical_url(distro_series_task)241 >>> canonical_url(distro_series_task)
242 u'http://bugs.launchpad.test/debian/sarge/+bug/3'242 u'http://bugs.launchpad.test/debian/+series/sarge/+bug/3'
243 >>> distro_series_task.transitionToTarget(243 >>> distro_series_task.transitionToTarget(
244 ... temp_target, getUtility(ILaunchBag).user)244 ... temp_target, getUtility(ILaunchBag).user)
245245
@@ -263,7 +263,7 @@ private.)
263A private bugtask, as an anonymous user.263A private bugtask, as an anonymous user.
264264
265 >>> canonical_url(distro_series_task)265 >>> canonical_url(distro_series_task)
266 u'http://bugs.launchpad.test/debian/sarge/+source/mozilla-firefox/+bug/3'266 u'http://bugs.launchpad.test/debian/+series/sarge/+source/mozilla-firefox/+bug/3'
267267
268 >>> login("foo.bar@canonical.com")268 >>> login("foo.bar@canonical.com")
269 >>> distro_series_task.bug.setPrivate(False, getUtility(ILaunchBag).user)269 >>> distro_series_task.bug.setPrivate(False, getUtility(ILaunchBag).user)
diff --git a/lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.html b/lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.html
index 18266ae..a4ed005 100644
--- a/lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.html
+++ b/lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.html
@@ -79,7 +79,7 @@ GNU Affero General Public License version 3 (see the file LICENSE).
79 (23456 bytes)79 (23456 bytes)
80 </td>80 </td>
81 <td>81 <td>
82 <a class="sprite distribution" href="/ubuntu/hoary/i386">i386</a>82 <a class="sprite distribution" href="/ubuntu/+series/hoary/i386">i386</a>
83 </td>83 </td>
84 <td>84 <td>
85 <a href="/ubuntu" class="sprite distribution">Primary Archive for Ubuntu Linux</a>85 <a href="/ubuntu" class="sprite distribution">Primary Archive for Ubuntu Linux</a>
@@ -94,7 +94,7 @@ GNU Affero General Public License version 3 (see the file LICENSE).
94 in 1 minute (estimated)94 in 1 minute (estimated)
95 </td>95 </td>
96 <td>96 <td>
97 <a class="sprite distribution" href="/ubuntu/hoary/i386">i386</a>97 <a class="sprite distribution" href="/ubuntu/+series/hoary/i386">i386</a>
98 </td>98 </td>
99 <td>99 <td>
100 <a href="/ubuntu" class="sprite distribution">Primary Archive for Ubuntu Linux</a>100 <a href="/ubuntu" class="sprite distribution">Primary Archive for Ubuntu Linux</a>
diff --git a/lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.js b/lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.js
index 2422400..a4391f7 100644
--- a/lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.js
+++ b/lib/lp/snappy/javascript/tests/test_snap.update_build_statuses.js
@@ -107,7 +107,7 @@ YUI.add('lp.snappy.snap.update_build_statuses.test', function (Y) {
107 "self_link": "/~max/+snap/snap/+build/3",107 "self_link": "/~max/+snap/snap/+build/3",
108 "id": 3,108 "id": 3,
109 "distro_arch_series_link":109 "distro_arch_series_link":
110 "/ubuntu/hoary/amd64",110 "/ubuntu/+series/hoary/amd64",
111 "architecture_tag": "amd64",111 "architecture_tag": "amd64",
112 "archive_link":112 "archive_link":
113 '<a href="/ubuntu" ' +113 '<a href="/ubuntu" ' +
@@ -124,7 +124,7 @@ YUI.add('lp.snappy.snap.update_build_statuses.test', function (Y) {
124 "self_link": "/~max/+snap/snap/+build/4",124 "self_link": "/~max/+snap/snap/+build/4",
125 "id": 4,125 "id": 4,
126 "distro_arch_series_link":126 "distro_arch_series_link":
127 "/ubuntu/hoary/i386",127 "/ubuntu/+series/hoary/i386",
128 "architecture_tag": "i386",128 "architecture_tag": "i386",
129 "archive_link":129 "archive_link":
130 '<a href="/ubuntu" ' +130 '<a href="/ubuntu" ' +
@@ -182,7 +182,7 @@ YUI.add('lp.snappy.snap.update_build_statuses.test', function (Y) {
182 "tag": "a",182 "tag": "a",
183 "attrs": {183 "attrs": {
184 "class": "sprite distribution",184 "class": "sprite distribution",
185 "href": "/ubuntu/hoary/amd64"185 "href": "/ubuntu/+series/hoary/amd64"
186 },186 },
187 "text": "amd64"187 "text": "amd64"
188 }]188 }]
@@ -236,7 +236,7 @@ YUI.add('lp.snappy.snap.update_build_statuses.test', function (Y) {
236 "tag": "a",236 "tag": "a",
237 "attrs": {237 "attrs": {
238 "class": "sprite distribution",238 "class": "sprite distribution",
239 "href": "/ubuntu/hoary/i386"239 "href": "/ubuntu/+series/hoary/i386"
240 },240 },
241 "text": "i386"241 "text": "i386"
242 }]242 }]
diff --git a/lib/lp/snappy/tests/test_snap.py b/lib/lp/snappy/tests/test_snap.py
index 8c87c8a..e791666 100644
--- a/lib/lp/snappy/tests/test_snap.py
+++ b/lib/lp/snappy/tests/test_snap.py
@@ -1148,7 +1148,7 @@ class TestSnap(TestCaseWithFactory):
1148 {1148 {
1149 "self_link": expected_snap_url + "/+build/%d" % build.id,1149 "self_link": expected_snap_url + "/+build/%d" % build.id,
1150 "id": build.id,1150 "id": build.id,
1151 "distro_arch_series_link": "/%s/%s/%s" % (1151 "distro_arch_series_link": "/%s/+series/%s/%s" % (
1152 snap.distro_series.distribution.name,1152 snap.distro_series.distribution.name,
1153 snap.distro_series.name,1153 snap.distro_series.name,
1154 build.distro_arch_series.architecturetag),1154 build.distro_arch_series.architecturetag),
diff --git a/lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt b/lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt
index a5b1c45..f4da8b5 100644
--- a/lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt
+++ b/lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt
@@ -47,8 +47,10 @@ should be rendered for this dependency.
4747
48 >>> for dep in pmount_deps:48 >>> for dep in pmount_deps:
49 ... dep.name, dep.operator, dep.version, dep.url49 ... dep.name, dep.operator, dep.version, dep.url
50 (u'at', u'>=', u'3.14156', u'http://launchpad.test/ubuntu/hoary/i386/at')50 (u'at', u'>=', u'3.14156',
51 (u'linux-2.6.12', None, u'', u'http://launchpad.test/ubuntu/hoary/i386/linux-2.6.12')51 u'http://launchpad.test/ubuntu/+series/hoary/i386/at')
52 (u'linux-2.6.12', None, u'',
53 u'http://launchpad.test/ubuntu/+series/hoary/i386/linux-2.6.12')
52 (u'tramp-package', None, u'', None)54 (u'tramp-package', None, u'', None)
5355
54Other relationship groups use the same mechanism.56Other relationship groups use the same mechanism.
diff --git a/lib/lp/soyuz/browser/tests/sourcepackage-views.txt b/lib/lp/soyuz/browser/tests/sourcepackage-views.txt
index d7a45d0..f15af9f 100644
--- a/lib/lp/soyuz/browser/tests/sourcepackage-views.txt
+++ b/lib/lp/soyuz/browser/tests/sourcepackage-views.txt
@@ -83,7 +83,8 @@ return a IPackageRelationshipSet object (see package-relationship.txt).
83 (u'gcc-3.4-base', None, u'', None)83 (u'gcc-3.4-base', None, u'', None)
84 (u'libc6', u'>=', u'2.3.2.ds1-4', None)84 (u'libc6', u'>=', u'2.3.2.ds1-4', None)
85 (u'libstdc++6-dev', u'>=', u'3.4.1-4sarge1', None)85 (u'libstdc++6-dev', u'>=', u'3.4.1-4sarge1', None)
86 (u'pmount', None, u'', u'http://launchpad.test/ubuntu/warty/+package/pmount')86 (u'pmount', None, u'',
87 u'http://launchpad.test/ubuntu/+series/warty/+package/pmount')
8788
8889
89 >>> firefox_parsed_dependsindep = firefox_view.builddependsindep90 >>> firefox_parsed_dependsindep = firefox_view.builddependsindep
@@ -95,7 +96,8 @@ return a IPackageRelationshipSet object (see package-relationship.txt).
95 ... dep.name, dep.operator, dep.version, dep.url96 ... dep.name, dep.operator, dep.version, dep.url
96 (u'bacula-common', u'=', u'1.34.6-2', None)97 (u'bacula-common', u'=', u'1.34.6-2', None)
97 (u'bacula-director-common', u'=', u'1.34.6-2', None)98 (u'bacula-director-common', u'=', u'1.34.6-2', None)
98 (u'pmount', None, u'', u'http://launchpad.test/ubuntu/warty/+package/pmount')99 (u'pmount', None, u'',
100 u'http://launchpad.test/ubuntu/+series/warty/+package/pmount')
99 (u'postgresql-client', u'>=', u'7.4', None)101 (u'postgresql-client', u'>=', u'7.4', None)
100102
101Ensure we have fixed bug 31039, by properly escape the103Ensure we have fixed bug 31039, by properly escape the
diff --git a/lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt b/lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt
index b157e26..229da87 100644
--- a/lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt
+++ b/lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt
@@ -45,7 +45,7 @@ here first:
4545
46 >>> browser.open(46 >>> browser.open(
47 ... 'http://localhost'47 ... 'http://localhost'
48 ... '/ubuntu/breezy-autotest/+package/mozilla-firefox')48 ... '/ubuntu/+series/breezy-autotest/+package/mozilla-firefox')
49 >>> print(browser.title)49 >>> print(browser.title)
50 mozilla-firefox : Breezy Badger Autotest (6.6.6) : Ubuntu50 mozilla-firefox : Breezy Badger Autotest (6.6.6) : Ubuntu
5151
@@ -248,7 +248,7 @@ As can be seen, the packaging is not linked yet. We can do that now using the
248248
249 >>> user_browser.getLink("Set upstream link").click()249 >>> user_browser.getLink("Set upstream link").click()
250 >>> print(user_browser.url)250 >>> print(user_browser.url)
251 http://launchpad.test/ubuntu/warty/+source/iceweasel/+edit-packaging251 http://launchpad.test/ubuntu/+series/warty/+source/iceweasel/+edit-packaging
252252
253In step one the project is specified.253In step one the project is specified.
254254
diff --git a/lib/lp/soyuz/stories/distroseries/add-architecture.txt b/lib/lp/soyuz/stories/distroseries/add-architecture.txt
index 9d832f2..72887e5 100644
--- a/lib/lp/soyuz/stories/distroseries/add-architecture.txt
+++ b/lib/lp/soyuz/stories/distroseries/add-architecture.txt
@@ -5,7 +5,7 @@ Adding a new architecture to a distro series
5Launchpad admins are allowed to add a new arch (also called 'port') to a5Launchpad admins are allowed to add a new arch (also called 'port') to a
6given distro series.6given distro series.
77
8 >>> admin_browser.open('http://launchpad.test/ubuntu/hoary')8 >>> admin_browser.open('http://launchpad.test/ubuntu/+series/hoary')
9 >>> admin_browser.getLink('Add architecture').click()9 >>> admin_browser.getLink('Add architecture').click()
10 >>> print(admin_browser.title)10 >>> print(admin_browser.title)
11 Add a port of The Hoary...11 Add a port of The Hoary...
@@ -13,7 +13,7 @@ given distro series.
13There is a cancel link.13There is a cancel link.
1414
15 >>> admin_browser.getLink('Cancel')15 >>> admin_browser.getLink('Cancel')
16 <Link text='Cancel' url='http://launchpad.test/ubuntu/hoary'>16 <Link text='Cancel' url='http://launchpad.test/ubuntu/+series/hoary'>
1717
18To register a new architecture one has to specify the architecture tag, the18To register a new architecture one has to specify the architecture tag, the
19processor and whether or not that architecture is officially supported19processor and whether or not that architecture is officially supported
@@ -28,7 +28,7 @@ and/or has PPA support.
2828
29Architecture tag is restricted to the usual Launchpad name format.29Architecture tag is restricted to the usual Launchpad name format.
3030
31 >>> admin_browser.open('http://launchpad.test/ubuntu/hoary')31 >>> admin_browser.open('http://launchpad.test/ubuntu/+series/hoary')
32 >>> admin_browser.getLink('Add architecture').click()32 >>> admin_browser.getLink('Add architecture').click()
33 >>> admin_browser.getControl('Architecture Tag').value = 'foo bar'33 >>> admin_browser.getControl('Architecture Tag').value = 'foo bar'
34 >>> admin_browser.getControl('Continue').click()34 >>> admin_browser.getControl('Continue').click()
@@ -39,12 +39,13 @@ Architecture tag is restricted to the usual Launchpad name format.
39Other users won't see the link nor the page where a new port can be39Other users won't see the link nor the page where a new port can be
40registered.40registered.
4141
42 >>> user_browser.open('http://launchpad.test/ubuntu/hoary')42 >>> user_browser.open('http://launchpad.test/ubuntu/+series/hoary')
43 >>> user_browser.getLink('Add architecture')43 >>> user_browser.getLink('Add architecture')
44 Traceback (most recent call last):44 Traceback (most recent call last):
45 ...45 ...
46 LinkNotFoundError46 LinkNotFoundError
47 >>> user_browser.open('http://launchpad.test/ubuntu/hoary/+addport')47 >>> user_browser.open(
48 ... 'http://launchpad.test/ubuntu/+series/hoary/+addport')
48 Traceback (most recent call last):49 Traceback (most recent call last):
49 ...50 ...
50 Unauthorized:...51 Unauthorized:...
diff --git a/lib/lp/soyuz/stories/packaging/package-pages-navigation.txt b/lib/lp/soyuz/stories/packaging/package-pages-navigation.txt
index cb254f7..720f3eb 100644
--- a/lib/lp/soyuz/stories/packaging/package-pages-navigation.txt
+++ b/lib/lp/soyuz/stories/packaging/package-pages-navigation.txt
@@ -85,7 +85,7 @@ A distribution series source package inherits its distribution source
85package's facets.85package's facets.
8686
87 >>> anon_browser.open(87 >>> anon_browser.open(
88 ... 'http://launchpad.test/ubuntu/hoary/+source/alsa-utils')88 ... 'http://launchpad.test/ubuntu/+series/hoary/+source/alsa-utils')
89 >>> print_location(anon_browser.contents)89 >>> print_location(anon_browser.contents)
90 Hierarchy: Ubuntu > alsa-utils package90 Hierarchy: Ubuntu > alsa-utils package
91 Tabs:91 Tabs:
@@ -103,7 +103,7 @@ package's facets.
103Distribution series architectures pages inherit facets from the103Distribution series architectures pages inherit facets from the
104distribution.104distribution.
105105
106 >>> anon_browser.open('http://launchpad.test/ubuntu/hoary/i386')106 >>> anon_browser.open('http://launchpad.test/ubuntu/+series/hoary/i386')
107 >>> print_location(anon_browser.contents)107 >>> print_location(anon_browser.contents)
108 Hierarchy: Ubuntu > Hoary (5.04) > i386108 Hierarchy: Ubuntu > Hoary (5.04) > i386
109 Tabs:109 Tabs:
@@ -121,7 +121,8 @@ distribution.
121The distribution series architecture binary packages page inherits Code,121The distribution series architecture binary packages page inherits Code,
122Bugs, Blueprints and Translations from the distribution.122Bugs, Blueprints and Translations from the distribution.
123123
124 >>> anon_browser.open('http://launchpad.test/ubuntu/hoary/i386/pmount')124 >>> anon_browser.open(
125 ... 'http://launchpad.test/ubuntu/+series/hoary/i386/pmount')
125 >>> print_location(anon_browser.contents)126 >>> print_location(anon_browser.contents)
126 Hierarchy: Ubuntu > Hoary (5.04) > i386 > pmount127 Hierarchy: Ubuntu > Hoary (5.04) > i386 > pmount
127 Tabs:128 Tabs:
@@ -140,7 +141,7 @@ Distribution series architecture binary package releases pages inherit
140facets from the distribution.141facets from the distribution.
141142
142 >>> anon_browser.open(143 >>> anon_browser.open(
143 ... 'http://launchpad.test/ubuntu/hoary/i386/pmount/0.1-1')144 ... 'http://launchpad.test/ubuntu/+series/hoary/i386/pmount/0.1-1')
144 >>> print_location(anon_browser.contents)145 >>> print_location(anon_browser.contents)
145 Hierarchy: Ubuntu > Hoary (5.04) > i386 > pmount > 0.1-1146 Hierarchy: Ubuntu > Hoary (5.04) > i386 > pmount > 0.1-1
146 Tabs:147 Tabs:
diff --git a/lib/lp/soyuz/stories/soyuz/xx-binarypackagerelease-index.txt b/lib/lp/soyuz/stories/soyuz/xx-binarypackagerelease-index.txt
index 09d9edf..40f2505 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-binarypackagerelease-index.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-binarypackagerelease-index.txt
@@ -61,7 +61,7 @@ Let's just check if the page is presented without errors (see bug
6161
62 >>> browser.getLink('mozilla-firefox 0.9').click()62 >>> browser.getLink('mozilla-firefox 0.9').click()
63 >>> browser.url63 >>> browser.url
64 'http://launchpad.test/ubuntu/warty/i386/mozilla-firefox/0.9'64 'http://launchpad.test/ubuntu/+series/warty/i386/mozilla-firefox/0.9'
6565
66When rendering package relationships only existent packages contain66When rendering package relationships only existent packages contain
67links to within LP application, not found packages are rendered as67links to within LP application, not found packages are rendered as
@@ -75,26 +75,27 @@ links to a binary in the context in question.
75 ... parse_relationship_section(str(section))75 ... parse_relationship_section(str(section))
7676
77 >>> print_relation('provides')77 >>> print_relation('provides')
78 LINK: "mozilla-firefox" -> http://launchpad.test/ubuntu/warty/i386/mozilla-firefox78 LINK: "mozilla-firefox" ->
79 http://launchpad.test/ubuntu/+series/warty/i386/mozilla-firefox
7980
80 >>> print_relation('predepends')81 >>> print_relation('predepends')
81 TEXT: "foo"82 TEXT: "foo"
82 LINK: "pmount" -> http://launchpad.test/ubuntu/warty/i386/pmount83 LINK: "pmount" -> http://launchpad.test/ubuntu/+series/warty/i386/pmount
8384
84 >>> print_relation('enhances')85 >>> print_relation('enhances')
85 TEXT: "bar"86 TEXT: "bar"
86 LINK: "pmount" -> http://launchpad.test/ubuntu/warty/i386/pmount87 LINK: "pmount" -> http://launchpad.test/ubuntu/+series/warty/i386/pmount
8788
88 >>> print_relation('breaks')89 >>> print_relation('breaks')
89 TEXT: "baz"90 TEXT: "baz"
90 LINK: "pmount" -> http://launchpad.test/ubuntu/warty/i386/pmount91 LINK: "pmount" -> http://launchpad.test/ubuntu/+series/warty/i386/pmount
9192
92The 'Built-Using' section contains a link to a source in the context in93The 'Built-Using' section contains a link to a source in the context in
93question.94question.
9495
95 >>> print_relation('builtusing')96 >>> print_relation('builtusing')
96 LINK: "iceweasel (= 1.0)" ->97 LINK: "iceweasel (= 1.0)" ->
97 http://launchpad.test/ubuntu/warty/+source/iceweasel98 http://launchpad.test/ubuntu/+series/warty/+source/iceweasel
9899
99100
100'Depends', 'Conflicts', 'Replaces', 'Suggests' and 'Recommends'101'Depends', 'Conflicts', 'Replaces', 'Suggests' and 'Recommends'
@@ -131,7 +132,8 @@ Even when there is no information to present and the package control
131files don't contain the field, we still present the corresponding132files don't contain the field, we still present the corresponding
132relationship section.133relationship section.
133134
134 >>> browser.open('http://launchpad.test/ubuntu/warty/i386/pmount/0.1-1')135 >>> browser.open(
136 ... 'http://launchpad.test/ubuntu/+series/warty/i386/pmount/0.1-1')
135 >>> print_relation('predepends')137 >>> print_relation('predepends')
136 EMPTY SECTION138 EMPTY SECTION
137139
diff --git a/lib/lp/soyuz/stories/soyuz/xx-build-record.txt b/lib/lp/soyuz/stories/soyuz/xx-build-record.txt
index 17e0614..54a77b6 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-build-record.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-build-record.txt
@@ -115,10 +115,10 @@ to all the relevant entities involved in this build.
115 http://launchpad.test/ubuntutest115 http://launchpad.test/ubuntutest
116116
117 >>> print(anon_browser.getLink('Breezy Badger Autotest').url)117 >>> print(anon_browser.getLink('Breezy Badger Autotest').url)
118 http://launchpad.test/ubuntutest/breezy-autotest118 http://launchpad.test/ubuntutest/+series/breezy-autotest
119119
120 >>> print(anon_browser.getLink('i386').url)120 >>> print(anon_browser.getLink('i386').url)
121 http://launchpad.test/ubuntutest/breezy-autotest/i386121 http://launchpad.test/ubuntutest/+series/breezy-autotest/i386
122122
123Pending build records can be 'rescored', which will directly affect123Pending build records can be 'rescored', which will directly affect
124the time they will get started. A link to the corresponding help text124the time they will get started. A link to the corresponding help text
@@ -429,7 +429,7 @@ binary reference finally becomes a link to its corresponding page.
429 testing-bin 1.0429 testing-bin 1.0
430430
431 >>> print(anon_browser.getLink('testing-bin 1.0').url)431 >>> print(anon_browser.getLink('testing-bin 1.0').url)
432 http://launchpad.test/ubuntutest/breezy-autotest/i386/testing-bin/1.0432 http://launchpad.test/ubuntutest/+series/breezy-autotest/i386/testing-bin/1.0
433433
434434
435PPA builds435PPA builds
@@ -501,10 +501,10 @@ packages, since they do not exist.
501 http://launchpad.test/~cprov/+archive/ubuntu/ppa501 http://launchpad.test/~cprov/+archive/ubuntu/ppa
502502
503 >>> print(anon_browser.getLink('Breezy Badger Autotest').url)503 >>> print(anon_browser.getLink('Breezy Badger Autotest').url)
504 http://launchpad.test/ubuntutest/breezy-autotest504 http://launchpad.test/ubuntutest/+series/breezy-autotest
505505
506 >>> print(anon_browser.getLink('i386', index=1).url)506 >>> print(anon_browser.getLink('i386', index=1).url)
507 http://launchpad.test/ubuntutest/breezy-autotest/i386507 http://launchpad.test/ubuntutest/+series/breezy-autotest/i386
508508
509Similarly, binary packages are not linkified in 'Binary packages'509Similarly, binary packages are not linkified in 'Binary packages'
510section for PPA builds.510section for PPA builds.
@@ -591,4 +591,4 @@ record always link to its binaries.
591 imported-bin 666591 imported-bin 666
592592
593 >>> print(anon_browser.getLink('imported-bin 666').url)593 >>> print(anon_browser.getLink('imported-bin 666').url)
594 http://launchpad.test/ubuntutest/breezy-autotest/i386/imported-bin/666594 http://launchpad.test/ubuntutest/+series/breezy-autotest/i386/imported-bin/666
diff --git a/lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt b/lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt
index 4f062a9..fa773cf 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt
@@ -49,7 +49,7 @@ For Distribution, it's possible to filter build results by state and name:
4949
50For DistroSeries, an architecture filter is also presented:50For DistroSeries, an architecture filter is also presented:
5151
52 >>> anon_browser.open("http://launchpad.test/ubuntu/hoary")52 >>> anon_browser.open("http://launchpad.test/ubuntu/+series/hoary")
53 >>> anon_browser.getLink("Show builds").click()53 >>> anon_browser.getLink("Show builds").click()
54 >>> print(anon_browser.title)54 >>> print(anon_browser.title)
55 Builds : Hoary (5.04) : Ubuntu55 Builds : Hoary (5.04) : Ubuntu
@@ -59,7 +59,7 @@ For DistroSeries, an architecture filter is also presented:
5959
60For DistroArchSeries, same as Distribution:60For DistroArchSeries, same as Distribution:
6161
62 >>> anon_browser.open("http://launchpad.test/ubuntu/hoary/i386")62 >>> anon_browser.open("http://launchpad.test/ubuntu/+series/hoary/i386")
63 >>> anon_browser.getLink("Show builds").click()63 >>> anon_browser.getLink("Show builds").click()
64 >>> print(anon_browser.title)64 >>> print(anon_browser.title)
65 Builds : i386 : Hoary (5.04) : Ubuntu65 Builds : i386 : Hoary (5.04) : Ubuntu
@@ -91,7 +91,7 @@ For Archive (PPA), same as Distribution:
91For SourcePackage, it's only possible to filter by state.91For SourcePackage, it's only possible to filter by state.
9292
93 >>> anon_browser.open(93 >>> anon_browser.open(
94 ... "http://launchpad.test/ubuntu/hoary/+source/pmount")94 ... "http://launchpad.test/ubuntu/+series/hoary/+source/pmount")
95 >>> anon_browser.getLink("Show builds").click()95 >>> anon_browser.getLink("Show builds").click()
96 >>> print(anon_browser.title)96 >>> print(anon_browser.title)
97 Builds : Hoary (5.04) : pmount package : Ubuntu97 Builds : Hoary (5.04) : pmount package : Ubuntu
@@ -430,7 +430,7 @@ repeat the same set of accesses done for Distribution Builds page.
430430
431 >>> anon_browser.open(431 >>> anon_browser.open(
432 ... "http://launchpad.test/"432 ... "http://launchpad.test/"
433 ... "ubuntu/hoary/+source/mozilla-firefox/+builds")433 ... "ubuntu/+series/hoary/+source/mozilla-firefox/+builds")
434434
435When anonymous user first load only 'No packages currently building'435When anonymous user first load only 'No packages currently building'
436message is presented.436message is presented.
@@ -480,7 +480,7 @@ page as any other packages from the primary archive.
480And also on the distro series builds page:480And also on the distro series builds page:
481481
482 >>> anon_browser.open(482 >>> anon_browser.open(
483 ... "http://launchpad.test/ubuntu/breezy-autotest/+builds"483 ... "http://launchpad.test/ubuntu/+series/breezy-autotest/+builds"
484 ... "?build_text=commercialpackage&build_state=built")484 ... "?build_text=commercialpackage&build_state=built")
485485
486 >>> print(extract_text(486 >>> print(extract_text(
diff --git a/lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt b/lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt
index c944439..b681204 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt
@@ -116,7 +116,7 @@ uploaded to.
116 http://launchpad.test/~name16116 http://launchpad.test/~name16
117117
118 >>> print(anon_browser.getLink('Breezy Badger Autotest').url)118 >>> print(anon_browser.getLink('Breezy Badger Autotest').url)
119 http://launchpad.test/ubuntutest/breezy-autotest119 http://launchpad.test/ubuntutest/+series/breezy-autotest
120120
121 >>> print(anon_browser.getLink('Maintainer').url)121 >>> print(anon_browser.getLink('Maintainer').url)
122 http://launchpad.test/~maintainer122 http://launchpad.test/~maintainer
@@ -242,7 +242,7 @@ produced by this source. Each binary links to its specific
242 No description available for foo-bin in ubuntutest breezy-autotest.242 No description available for foo-bin in ubuntutest breezy-autotest.
243243
244 >>> print(anon_browser.getLink('foo-bin').url)244 >>> print(anon_browser.getLink('foo-bin').url)
245 http://launchpad.test/ubuntutest/breezy-autotest/+package/foo-bin245 http://launchpad.test/ubuntutest/+series/breezy-autotest/+package/foo-bin
246246
247The binary package summary and description are retrieved from the247The binary package summary and description are retrieved from the
248package caches (see doc/package-cache.txt).248package caches (see doc/package-cache.txt).
diff --git a/lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt b/lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt
index 39bd697..baba563 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt
@@ -19,7 +19,7 @@ system, so it's impossible to get there except by typing the entire
19URL:19URL:
2020
21 >>> browser.open(21 >>> browser.open(
22 ... 'http://launchpad.test/ubuntu/warty/i386/mozilla-firefox')22 ... 'http://launchpad.test/ubuntu/+series/warty/i386/mozilla-firefox')
2323
24This page provides the publishing history of this BinaryPackage within24This page provides the publishing history of this BinaryPackage within
25this architecture:25this architecture:
@@ -43,7 +43,7 @@ It also provides a link to the currently published version:
43As well as a link to the related distribution source package:43As well as a link to the related distribution source package:
4444
45 >>> browser.open(45 >>> browser.open(
46 ... 'http://launchpad.test/ubuntu/warty/i386/mozilla-firefox')46 ... 'http://launchpad.test/ubuntu/+series/warty/i386/mozilla-firefox')
47 >>> browser.getLink(id="source_package").click()47 >>> browser.getLink(id="source_package").click()
48 >>> print(browser.title.decode('ascii', 'ignore'))48 >>> print(browser.title.decode('ascii', 'ignore'))
49 iceweasel package : Ubuntu49 iceweasel package : Ubuntu
@@ -52,7 +52,7 @@ If the binary distribution does not have a current release, then the
52link to the source package will not be present:52link to the source package will not be present:
5353
54 >>> browser.open(54 >>> browser.open(
55 ... 'http://launchpad.test/debian/woody/i386/pmount')55 ... 'http://launchpad.test/debian/+series/woody/i386/pmount')
56 >>> print(browser.getLink(id="source_package"))56 >>> print(browser.getLink(id="source_package"))
57 Traceback (most recent call last):57 Traceback (most recent call last):
58 ...58 ...
@@ -71,11 +71,11 @@ It's also reachable in a more natural way, starting from distribution page:
7171
72Then we get to the DistroSeries page:72Then we get to the DistroSeries page:
7373
74 >>> browser.getLink(url='/ubuntu/warty').click()74 >>> browser.getLink(url='/ubuntu/+series/warty').click()
7575
76Then the DistroArchSeries page:76Then the DistroArchSeries page:
7777
78 >>> browser.getLink(url='/ubuntu/warty/i386').click()78 >>> browser.getLink(url='/ubuntu/+series/warty/i386').click()
7979
80Now we are able to use the search box in this page:80Now we are able to use the search box in this page:
8181
@@ -157,7 +157,7 @@ Binary Packages with no files to present results in a clear statement
157intead of a empty section.157intead of a empty section.
158158
159 >>> browser.open(159 >>> browser.open(
160 ... 'http://launchpad.test/ubuntu/hoary/i386/pmount/0.1-1')160 ... 'http://launchpad.test/ubuntu/+series/hoary/i386/pmount/0.1-1')
161 >>> print(extract_text(find_tag_by_id(browser.contents, 'files')))161 >>> print(extract_text(find_tag_by_id(browser.contents, 'files')))
162 i386 build of pmount 0.1-1 in ubuntu hoary RELEASE162 i386 build of pmount 0.1-1 in ubuntu hoary RELEASE
163 produced no files for this binary package.163 produced no files for this binary package.
@@ -175,7 +175,8 @@ Their page functionality is identical to regular packages, which is described
175in the previous section of this page.175in the previous section of this page.
176176
177 >>> browser.open(177 >>> browser.open(
178 ... 'http://launchpad.test/ubuntu/breezy-autotest/i386/commercialpackage')178 ... 'http://launchpad.test/ubuntu/+series/breezy-autotest/i386/'
179 ... 'commercialpackage')
179180
180This page provides the publishing history of this BinaryPackage within181This page provides the publishing history of this BinaryPackage within
181this architecture:182this architecture:
@@ -251,7 +252,7 @@ If the publishing is a copy, the original location, distribution,
251distroseries and archive are shown.252distroseries and archive are shown.
252253
253 >>> anon_browser.open(254 >>> anon_browser.open(
254 ... 'http://launchpad.test/ubuntu/warty/i386/pmount')255 ... 'http://launchpad.test/ubuntu/+series/warty/i386/pmount')
255256
256 >>> print(extract_text(257 >>> print(extract_text(
257 ... find_tag_by_id(anon_browser.contents, 'publishing-summary')))258 ... find_tag_by_id(anon_browser.contents, 'publishing-summary')))
diff --git a/lib/lp/soyuz/stories/soyuz/xx-distroarchseries.txt b/lib/lp/soyuz/stories/soyuz/xx-distroarchseries.txt
index 8752daa..1017e78 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-distroarchseries.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-distroarchseries.txt
@@ -44,7 +44,7 @@ considering partial string matches as well (fti).
44 >>> anon_browser.getControl(name="text").value = "firefox"44 >>> anon_browser.getControl(name="text").value = "firefox"
45 >>> anon_browser.getControl("Search Packages").click()45 >>> anon_browser.getControl("Search Packages").click()
46 >>> anon_browser.url46 >>> anon_browser.url
47 'http://launchpad.test/ubuntu/warty/i386/+index?text=firefox'47 'http://launchpad.test/ubuntu/+series/warty/i386/+index?text=firefox'
4848
49Searching for "firefox" finds several binary packages. Each search49Searching for "firefox" finds several binary packages. Each search
50result is displayed as the binary package name followed by the binary50result is displayed as the binary package name followed by the binary
@@ -84,7 +84,7 @@ page. The builds page is described in 23-builds-page.txt.
84Only administrators can edit ('administer', in fact) the84Only administrators can edit ('administer', in fact) the
85distroarchseries details.85distroarchseries details.
8686
87 >>> admin_browser.open("http://launchpad.test/ubuntu/warty/i386/")87 >>> admin_browser.open("http://launchpad.test/ubuntu/+series/warty/i386/")
88 >>> print(extract_text(88 >>> print(extract_text(
89 ... find_tag_by_id(admin_browser.contents, 'global-actions')))89 ... find_tag_by_id(admin_browser.contents, 'global-actions')))
90 Administer90 Administer
@@ -93,7 +93,8 @@ distroarchseries details.
93Non privileged access to the admin page results in a 'Unauthorized'93Non privileged access to the admin page results in a 'Unauthorized'
94error.94error.
9595
96 >>> user_browser.open("http://launchpad.test/ubuntu/warty/i386/+admin")96 >>> user_browser.open(
97 ... "http://launchpad.test/ubuntu/+series/warty/i386/+admin")
97 Traceback (most recent call last):98 Traceback (most recent call last):
98 ...99 ...
99 Unauthorized...100 Unauthorized...
@@ -111,7 +112,7 @@ The page presents a cancellation link that returns the user back to the
111DistroArchSeries page if clicked:112DistroArchSeries page if clicked:
112113
113 >>> print(admin_browser.getLink("Cancel").url)114 >>> print(admin_browser.getLink("Cancel").url)
114 http://launchpad.test/ubuntu/warty/i386115 http://launchpad.test/ubuntu/+series/warty/i386
115116
116Removing the official support for this DistroArchSeries.117Removing the official support for this DistroArchSeries.
117118
@@ -122,7 +123,7 @@ DistroArchSeries page.
122123
123 >>> admin_browser.getControl("Change").click()124 >>> admin_browser.getControl("Change").click()
124 >>> print(admin_browser.url)125 >>> print(admin_browser.url)
125 http://launchpad.test/ubuntu/warty/i386126 http://launchpad.test/ubuntu/+series/warty/i386
126127
127There's also a notification message announcing the success of the change:128There's also a notification message announcing the success of the change:
128129
@@ -174,7 +175,7 @@ current distroseries architecture list.
174Users with administrative privileges on a DistroSeries can open new175Users with administrative privileges on a DistroSeries can open new
175architectures in this DistroSeries.176architectures in this DistroSeries.
176177
177 >>> admin_browser.open("http://launchpad.test/ubuntu/hoary")178 >>> admin_browser.open("http://launchpad.test/ubuntu/+series/hoary")
178 >>> admin_browser.getLink("Add architecture").click()179 >>> admin_browser.getLink("Add architecture").click()
179 >>> print(admin_browser.title)180 >>> print(admin_browser.title)
180 Add a port of The Hoary Hedgehog...181 Add a port of The Hoary Hedgehog...
@@ -215,7 +216,7 @@ I will address it one 1.1.12 is gone.
215An administrator can open new distinct architecture, for instance,216An administrator can open new distinct architecture, for instance,
216'amd64'.217'amd64'.
217218
218 >>> admin_browser.open("http://launchpad.test/ubuntu/hoary")219 >>> admin_browser.open("http://launchpad.test/ubuntu/+series/hoary")
219 >>> admin_browser.getLink("Add architecture").click()220 >>> admin_browser.getLink("Add architecture").click()
220221
221 >>> admin_browser.getControl("Architecture Tag").value = 'amd64'222 >>> admin_browser.getControl("Architecture Tag").value = 'amd64'
diff --git a/lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt b/lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt
index c7cf5eb..859c944 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt
@@ -4,7 +4,8 @@ A binary package for a distro-series displays the package's name,
4summary and description:4summary and description:
55
6 >>> browser.open(6 >>> browser.open(
7 ... 'http://launchpad.test/ubuntu/warty/+package/mozilla-firefox')7 ... 'http://launchpad.test/ubuntu/+series/warty/+package/'
8 ... 'mozilla-firefox')
8 >>> print(browser.title)9 >>> print(browser.title)
9 mozilla-firefox : Warty (4.10) : Ubuntu10 mozilla-firefox : Warty (4.10) : Ubuntu
1011
@@ -25,11 +26,11 @@ And each publishing history item is a link to the relevant binary
25release:26release:
2627
27 >>> print(browser.getLink('mozilla-firefox 0.9 in hppa (Release)').url)28 >>> print(browser.getLink('mozilla-firefox 0.9 in hppa (Release)').url)
28 http://launchpad.test/ubuntu/warty/hppa/mozilla-firefox/0.929 http://launchpad.test/ubuntu/+series/warty/hppa/mozilla-firefox/0.9
29 >>> print(browser.getLink('mozilla-firefox 0.9 in i386 (Release)').url)30 >>> print(browser.getLink('mozilla-firefox 0.9 in i386 (Release)').url)
30 http://launchpad.test/ubuntu/warty/i386/mozilla-firefox/0.931 http://launchpad.test/ubuntu/+series/warty/i386/mozilla-firefox/0.9
31 >>> print(browser.getLink('mozilla-firefox 1.0 in i386 (Release)').url)32 >>> print(browser.getLink('mozilla-firefox 1.0 in i386 (Release)').url)
32 http://launchpad.test/ubuntu/warty/i386/mozilla-firefox/1.033 http://launchpad.test/ubuntu/+series/warty/i386/mozilla-firefox/1.0
3334
34The page also displays a link to the distro series source package35The page also displays a link to the distro series source package
35release:36release:
@@ -42,7 +43,8 @@ Some DistroSeriesBinaryPackages are unpublished, in this case there is
42no link to any source package:43no link to any source package:
4344
44 >>> browser.open(45 >>> browser.open(
45 ... 'http://launchpad.test/ubuntu/hoary/+package/mozilla-firefox')46 ... 'http://launchpad.test/ubuntu/+series/hoary/+package/'
47 ... 'mozilla-firefox')
46 >>> print(browser.title)48 >>> print(browser.title)
47 mozilla-firefox : Hoary (5.04) : Ubuntu49 mozilla-firefox : Hoary (5.04) : Ubuntu
4850
diff --git a/lib/lp/soyuz/stories/soyuz/xx-distroseries-index.txt b/lib/lp/soyuz/stories/soyuz/xx-distroseries-index.txt
index 2e9f391..490ea2f 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-distroseries-index.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-distroseries-index.txt
@@ -4,11 +4,11 @@ a given name.
4As it's main functionality this page allow users to search for binary4As it's main functionality this page allow users to search for binary
5packages within the distroseries in context:5packages within the distroseries in context:
66
7 >>> anon_browser.open("http://launchpad.test/ubuntu/warty")7 >>> anon_browser.open("http://launchpad.test/ubuntu/+series/warty")
8 >>> anon_browser.getControl(name="text").value = "a"8 >>> anon_browser.getControl(name="text").value = "a"
9 >>> anon_browser.getControl("Find a Package").click()9 >>> anon_browser.getControl("Find a Package").click()
10 >>> anon_browser.url10 >>> anon_browser.url
11 'http://launchpad.test/ubuntu/warty/+search?text=a'11 'http://launchpad.test/ubuntu/+series/warty/+search?text=a'
12 >>> print(extract_text(12 >>> print(extract_text(
13 ... find_tag_by_id(anon_browser.contents, 'search-results'),13 ... find_tag_by_id(anon_browser.contents, 'search-results'),
14 ... formatter='html'))14 ... formatter='html'))
@@ -34,7 +34,7 @@ Each entry contains:
34 the upload was done.34 the upload was done.
3535
36 >>> anon_browser.open(36 >>> anon_browser.open(
37 ... "http://launchpad.test/ubuntu/warty/+portlet-latestuploads")37 ... "http://launchpad.test/ubuntu/+series/warty/+portlet-latestuploads")
38 >>> latest_uploads = str(find_tag_by_id(anon_browser.contents,38 >>> latest_uploads = str(find_tag_by_id(anon_browser.contents,
39 ... "latest-uploads"))39 ... "latest-uploads"))
40 >>> 'mozilla-firefox 0.9' in latest_uploads40 >>> 'mozilla-firefox 0.9' in latest_uploads
@@ -54,7 +54,7 @@ Empty results are also presented properly (even if they are quite rare
54in production environment):54in production environment):
5555
56 >>> anon_browser.open(56 >>> anon_browser.open(
57 ... "http://launchpad.test/ubuntutest/breezy-autotest/"57 ... "http://launchpad.test/ubuntutest/+series/breezy-autotest/"
58 ... "+portlet-latestuploads")58 ... "+portlet-latestuploads")
59 >>> find_tag_by_id(anon_browser.contents, 'no-latest-uploads') is not None59 >>> find_tag_by_id(anon_browser.contents, 'no-latest-uploads') is not None
60 True60 True
diff --git a/lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt b/lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt
index 0769ed2..7ed2cc6 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt
@@ -61,7 +61,7 @@ SourcePackage page:
6161
62 >>> browser.getLink("The Warty Warthog Release").click()62 >>> browser.getLink("The Warty Warthog Release").click()
63 >>> browser.url63 >>> browser.url
64 'http://launchpad.test/ubuntu/warty/+source/mozilla-firefox'64 'http://launchpad.test/ubuntu/+series/warty/+source/mozilla-firefox'
6565
66Any user can see the package summary.66Any user can see the package summary.
6767
@@ -107,7 +107,7 @@ Let's check the link to the binary package built on i386 architecture,
107a DistroArchSeriesBinaryPackage:107a DistroArchSeriesBinaryPackage:
108108
109 >>> print(browser.getLink("i386").url)109 >>> print(browser.getLink("i386").url)
110 http://launchpad.test/ubuntu/warty/i386/mozilla-firefox110 http://launchpad.test/ubuntu/+series/warty/i386/mozilla-firefox
111111
112More information about this page can be found at112More information about this page can be found at
11317-distroarchseries-binpackages.txt.11317-distroarchseries-binpackages.txt.
@@ -115,7 +115,7 @@ More information about this page can be found at
115Move back to the SourcePackage page to continue the tests:115Move back to the SourcePackage page to continue the tests:
116116
117 >>> browser.open(117 >>> browser.open(
118 ... 'http://launchpad.test/ubuntu/breezy-autotest/+source/'118 ... 'http://launchpad.test/ubuntu/+series/breezy-autotest/+source/'
119 ... 'commercialpackage')119 ... 'commercialpackage')
120120
121PackageRelationships, 'builddepends', 'builddependsindep', 'builddependsarch',121PackageRelationships, 'builddepends', 'builddependsindep', 'builddependsarch',
@@ -154,7 +154,7 @@ keeping the page format constant.
154Let's inspect a page with non-empty relationships.154Let's inspect a page with non-empty relationships.
155155
156 >>> browser.open(156 >>> browser.open(
157 ... 'http://launchpad.test/ubuntu/warty/+source/mozilla-firefox')157 ... 'http://launchpad.test/ubuntu/+series/warty/+source/mozilla-firefox')
158158
159 >>> depends_section = find_tag_by_id(browser.contents, 'depends')159 >>> depends_section = find_tag_by_id(browser.contents, 'depends')
160 >>> parse_relationship_section(str(depends_section))160 >>> parse_relationship_section(str(depends_section))
@@ -163,13 +163,13 @@ Let's inspect a page with non-empty relationships.
163 TEXT: "gcc-3.4-base"163 TEXT: "gcc-3.4-base"
164 TEXT: "libc6 (>= 2.3.2.ds1-4)"164 TEXT: "libc6 (>= 2.3.2.ds1-4)"
165 TEXT: "libstdc++6-dev (>= 3.4.1-4sarge1)"165 TEXT: "libstdc++6-dev (>= 3.4.1-4sarge1)"
166 LINK: "pmount" -> http://launchpad.test/ubuntu/warty/+package/pmount166 LINK: "pmount" -> http://launchpad.test/ubuntu/+series/warty/+package/pmount
167167
168 >>> dependsindep_section = find_tag_by_id(browser.contents, 'dependsindep')168 >>> dependsindep_section = find_tag_by_id(browser.contents, 'dependsindep')
169 >>> parse_relationship_section(str(dependsindep_section))169 >>> parse_relationship_section(str(dependsindep_section))
170 TEXT: "bacula-common (= 1.34.6-2)"170 TEXT: "bacula-common (= 1.34.6-2)"
171 TEXT: "bacula-director-common (= 1.34.6-2)"171 TEXT: "bacula-director-common (= 1.34.6-2)"
172 LINK: "pmount" -> http://launchpad.test/ubuntu/warty/+package/pmount172 LINK: "pmount" -> http://launchpad.test/ubuntu/+series/warty/+package/pmount
173 TEXT: "postgresql-client (>= 7.4)"173 TEXT: "postgresql-client (>= 7.4)"
174174
175 >>> dependsarch_section = find_tag_by_id(browser.contents, 'dependsarch')175 >>> dependsarch_section = find_tag_by_id(browser.contents, 'dependsarch')
@@ -179,13 +179,13 @@ Let's inspect a page with non-empty relationships.
179 >>> conflicts_section = find_tag_by_id(browser.contents, 'conflicts')179 >>> conflicts_section = find_tag_by_id(browser.contents, 'conflicts')
180 >>> parse_relationship_section(str(conflicts_section))180 >>> parse_relationship_section(str(conflicts_section))
181 TEXT: "gcc-4.0"181 TEXT: "gcc-4.0"
182 LINK: "pmount" -> http://launchpad.test/ubuntu/warty/+package/pmount182 LINK: "pmount" -> http://launchpad.test/ubuntu/+series/warty/+package/pmount
183183
184 >>> conflictsindep_section = find_tag_by_id(184 >>> conflictsindep_section = find_tag_by_id(
185 ... browser.contents, 'conflictsindep')185 ... browser.contents, 'conflictsindep')
186 >>> parse_relationship_section(str(conflictsindep_section))186 >>> parse_relationship_section(str(conflictsindep_section))
187 TEXT: "gcc-4.0-base"187 TEXT: "gcc-4.0-base"
188 LINK: "pmount" -> http://launchpad.test/ubuntu/warty/+package/pmount188 LINK: "pmount" -> http://launchpad.test/ubuntu/+series/warty/+package/pmount
189189
190 >>> conflictsarch_section = find_tag_by_id(190 >>> conflictsarch_section = find_tag_by_id(
191 ... browser.contents, 'conflictsarch')191 ... browser.contents, 'conflictsarch')
@@ -210,7 +210,7 @@ for each published version.
210210
211 >>> browser.getLink("View changelog").click()211 >>> browser.getLink("View changelog").click()
212 >>> browser.url212 >>> browser.url
213 'http://launchpad.test/ubuntu/warty/+source/mozilla-firefox/+changelog'213 'http://launchpad.test/ubuntu/+series/warty/+source/mozilla-firefox/+changelog'
214214
215 >>> tag = find_tag_by_id(browser.contents, 'mozilla-firefox_0.9')215 >>> tag = find_tag_by_id(browser.contents, 'mozilla-firefox_0.9')
216 >>> print(extract_text(tag))216 >>> print(extract_text(tag))
@@ -220,7 +220,7 @@ for each published version.
220Back to the SourcePackage page:220Back to the SourcePackage page:
221221
222 >>> browser.open(222 >>> browser.open(
223 ... 'http://launchpad.test/ubuntu/warty/+source/mozilla-firefox')223 ... 'http://launchpad.test/ubuntu/+series/warty/+source/mozilla-firefox')
224224
225Any user can see the copyright for the most recent source package release.225Any user can see the copyright for the most recent source package release.
226226
@@ -247,7 +247,8 @@ Any user can see the copyright for the most recent source package release.
247 Copyright 2010 Ford Prefect.247 Copyright 2010 Ford Prefect.
248248
249 >>> browser.open(249 >>> browser.open(
250 ... 'http://launchpad.test/ubuntu/warty/+source/mozilla-firefox')250 ... 'http://launchpad.test/ubuntu/+series/warty/+source/'
251 ... 'mozilla-firefox')
251252
252253
253We can visit a specific published release of "mozilla-firefox", this254We can visit a specific published release of "mozilla-firefox", this
@@ -261,7 +262,8 @@ The deprecated DistroSeriesSourcePackageRelease page redirects to the
261same place.262same place.
262263
263 >>> browser.open(264 >>> browser.open(
264 ... 'http://launchpad.test/ubuntu/warty/+source/mozilla-firefox/0.9')265 ... 'http://launchpad.test/ubuntu/+series/warty/+source/'
266 ... 'mozilla-firefox/0.9')
265 >>> browser.url267 >>> browser.url
266 'http://launchpad.test/ubuntu/+source/mozilla-firefox/0.9'268 'http://launchpad.test/ubuntu/+source/mozilla-firefox/0.9'
267269
@@ -332,7 +334,7 @@ Their page functionality is identical to regular packages, which is described
332in the previous section of this page.334in the previous section of this page.
333335
334 >>> browser.open(336 >>> browser.open(
335 ... "http://launchpad.test/ubuntu/breezy-autotest/"337 ... "http://launchpad.test/ubuntu/+series/breezy-autotest/"
336 ... "+source/commercialpackage")338 ... "+source/commercialpackage")
337339
338This page provides its versions publications organised by pocket.340This page provides its versions publications organised by pocket.
@@ -369,7 +371,7 @@ Let's check the link to the binary package built on i386 architecture,
369a DistroArchSeriesBinaryPackage:371a DistroArchSeriesBinaryPackage:
370372
371 >>> print(browser.getLink("i386").url)373 >>> print(browser.getLink("i386").url)
372 http://launchpad.test/ubuntu/breezy-autotest/i386/commercialpackage374 http://launchpad.test/ubuntu/+series/breezy-autotest/i386/commercialpackage
373375
374More information about this page can be found at376More information about this page can be found at
37517-distroarchseries-binpackages.txt.37717-distroarchseries-binpackages.txt.
@@ -391,7 +393,7 @@ for each published version.
391393
392 >>> browser.getLink("View changelog").click()394 >>> browser.getLink("View changelog").click()
393 >>> browser.url395 >>> browser.url
394 'http://launchpad.test/ubuntu/breezy-autotest/+source/commercialpackage/+changelog'396 'http://launchpad.test/ubuntu/+series/breezy-autotest/+source/commercialpackage/+changelog'
395397
396 >>> tag = find_tag_by_id(browser.contents, 'commercialpackage_1.0-1')398 >>> tag = find_tag_by_id(browser.contents, 'commercialpackage_1.0-1')
397 >>> print(extract_text(tag))399 >>> print(extract_text(tag))
@@ -401,7 +403,7 @@ for each published version.
401Back to the SourcePackage page:403Back to the SourcePackage page:
402404
403 >>> browser.open(405 >>> browser.open(
404 ... "http://launchpad.test/ubuntu/breezy-autotest/+source/"406 ... "http://launchpad.test/ubuntu/+series/breezy-autotest/+source/"
405 ... "commercialpackage")407 ... "commercialpackage")
406408
407We can visit a specific published release of "commercialpackage", this409We can visit a specific published release of "commercialpackage", this
diff --git a/lib/lp/soyuz/stories/soyuz/xx-person-packages.txt b/lib/lp/soyuz/stories/soyuz/xx-person-packages.txt
index 95ff407..06b0c79 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-person-packages.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-person-packages.txt
@@ -66,7 +66,7 @@ The second column links to the distribution series source package page. The
66user follows the "Ubuntu Hoary" link next to cnews:66user follows the "Ubuntu Hoary" link next to cnews:
6767
68 >>> browser.open("http://launchpad.test/~name16/+related-packages")68 >>> browser.open("http://launchpad.test/~name16/+related-packages")
69 >>> link = browser.getLink(url="/ubuntu/hoary/+source/cnews")69 >>> link = browser.getLink(url="/ubuntu/+series/hoary/+source/cnews")
70 >>> print(link)70 >>> print(link)
71 <Link text='Ubuntu Hoary' ...>71 <Link text='Ubuntu Hoary' ...>
72 >>> link.click()72 >>> link.click()
diff --git a/lib/lp/soyuz/stories/soyuz/xx-portlet-publishing-details.txt b/lib/lp/soyuz/stories/soyuz/xx-portlet-publishing-details.txt
index 93e2bb0..3105e97 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-portlet-publishing-details.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-portlet-publishing-details.txt
@@ -21,7 +21,7 @@ into account any overrides applied since the package was uploaded.
21Series and versions are linkified.21Series and versions are linkified.
2222
23 >>> print(browser.getLink('Hoary').url)23 >>> print(browser.getLink('Hoary').url)
24 http://bugs.launchpad.test/ubuntu/hoary/+source/alsa-utils24 http://bugs.launchpad.test/ubuntu/+series/hoary/+source/alsa-utils
25 >>> print(browser.getLink('1.0.9a-4').url)25 >>> print(browser.getLink('1.0.9a-4').url)
26 http://launchpad.test/ubuntu/+source/alsa-utils/1.0.9a-426 http://launchpad.test/ubuntu/+source/alsa-utils/1.0.9a-4
2727
diff --git a/lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt b/lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt
index 6824527..275a2c6 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt
@@ -37,7 +37,7 @@ component:
37 ... print(extract_text(row))37 ... print(extract_text(row))
3838
39 >>> motu_browser.open(39 >>> motu_browser.open(
40 ... "http://launchpad.test/ubuntu/breezy-autotest/")40 ... "http://launchpad.test/ubuntu/+series/breezy-autotest/")
41 >>> motu_browser.getLink("All uploads").click()41 >>> motu_browser.getLink("All uploads").click()
42 >>> print_queue(motu_browser.contents)42 >>> print_queue(motu_browser.contents)
43 Package Version Component Section Priority Sets Pocket When43 Package Version Component Section Priority Sets Pocket When
diff --git a/lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt b/lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt
index 4e2ec21..d5c7f49 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt
@@ -54,7 +54,7 @@ The link "View Uploads" is presented in Distrorelease page.
54Viewing the current queue, by default the NEW queue.54Viewing the current queue, by default the NEW queue.
5555
56 >>> anon_browser.open(56 >>> anon_browser.open(
57 ... "http://launchpad.test/ubuntu/breezy-autotest/")57 ... "http://launchpad.test/ubuntu/+series/breezy-autotest/")
58 >>> anon_browser.getLink("All uploads").click()58 >>> anon_browser.getLink("All uploads").click()
5959
60 >>> anon_browser.getControl(60 >>> anon_browser.getControl(
@@ -330,12 +330,12 @@ the form twice.
330 >>> duplicate_submission_browser = setupBrowser(330 >>> duplicate_submission_browser = setupBrowser(
331 ... auth="Basic test@canonical.com:test")331 ... auth="Basic test@canonical.com:test")
332 >>> duplicate_submission_browser.open(332 >>> duplicate_submission_browser.open(
333 ... "http://localhost/ubuntu/breezy-autotest/+queue")333 ... "http://localhost/ubuntu/+series/breezy-autotest/+queue")
334334
335Go back to the "new" queue and accept "bar":335Go back to the "new" queue and accept "bar":
336336
337 >>> upload_manager_browser.open(337 >>> upload_manager_browser.open(
338 ... "http://localhost/ubuntu/breezy-autotest/+queue")338 ... "http://localhost/ubuntu/+series/breezy-autotest/+queue")
339 >>> print_queue(upload_manager_browser.contents)339 >>> print_queue(upload_manager_browser.contents)
340 Package Version Component Section Priority Sets Pocket When340 Package Version Component Section Priority Sets Pocket When
341 bar (source) 1.0-1 universe devel low Release ...341 bar (source) 1.0-1 universe devel low Release ...
@@ -393,7 +393,7 @@ accepted queue since it skips that state and goes straight to being published.
393Let's accept mozilla-firefox so we can see it in the accepted queue:393Let's accept mozilla-firefox so we can see it in the accepted queue:
394394
395 >>> upload_manager_browser.open(395 >>> upload_manager_browser.open(
396 ... "http://localhost/ubuntu/breezy-autotest/+queue")396 ... "http://localhost/ubuntu/+series/breezy-autotest/+queue")
397 >>> upload_manager_browser.getControl(name="QUEUE_ID").value = ['1']397 >>> upload_manager_browser.getControl(name="QUEUE_ID").value = ['1']
398 >>> upload_manager_browser.getControl(name="Accept").click()398 >>> upload_manager_browser.getControl(name="Accept").click()
399 >>> print_feedback_messages(upload_manager_browser.contents)399 >>> print_feedback_messages(upload_manager_browser.contents)
diff --git a/lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt b/lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt
index c4ff5b4..9dc34f1 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt
@@ -4,7 +4,8 @@ Source package changelog
4Browse the changelog of a sourcepackage..4Browse the changelog of a sourcepackage..
55
6 >>> user_browser.open(6 >>> user_browser.open(
7 ... "http://launchpad.test/ubuntu/hoary/+source/pmount/+changelog")7 ... "http://launchpad.test/ubuntu/+series/hoary/+source/pmount/"
8 ... "+changelog")
8 >>> print_location(user_browser.contents)9 >>> print_location(user_browser.contents)
9 Hierarchy: Ubuntu > ...pmount... package > Hoary (5.04) > Change log10 Hierarchy: Ubuntu > ...pmount... package > Hoary (5.04) > Change log
10 Tabs:11 Tabs:
@@ -28,7 +29,8 @@ Browse the changelog of a sourcepackage..
28.. and another one:29.. and another one:
2930
30 >>> user_browser.open(31 >>> user_browser.open(
31 ... "http://launchpad.test/ubuntu/hoary/+source/alsa-utils/+changelog")32 ... "http://launchpad.test/ubuntu/+series/hoary/+source/alsa-utils/"
33 ... "+changelog")
32 >>> print(extract_text(34 >>> print(extract_text(
33 ... find_tag_by_id(user_browser.contents, 'changelogs')))35 ... find_tag_by_id(user_browser.contents, 'changelogs')))
34 alsa-utils (1.0.9a-4ubuntu1) hoary; urgency=low36 alsa-utils (1.0.9a-4ubuntu1) hoary; urgency=low
@@ -70,7 +72,8 @@ the changelog are obfuscated when the user is not logged in (this stops
70bots from picking them up):72bots from picking them up):
7173
72 >>> anon_browser.open(74 >>> anon_browser.open(
73 ... "http://launchpad.test/ubuntu/hoary/+source/alsa-utils/+changelog")75 ... "http://launchpad.test/ubuntu/+series/hoary/+source/alsa-utils/"
76 ... "+changelog")
74 >>> print(extract_text(find_main_content(anon_browser.contents)))77 >>> print(extract_text(find_main_content(anon_browser.contents)))
75 Change logs for ...alsa-utils... in Hoary78 Change logs for ...alsa-utils... in Hoary
76 ...79 ...
@@ -84,8 +87,8 @@ address is linkified to point to the person's profile page. Here,
84'commercialpackage' has a known email address in its changelog:87'commercialpackage' has a known email address in its changelog:
8588
86 >>> user_browser.open(89 >>> user_browser.open(
87 ... "http://launchpad.test/ubuntu/breezy-autotest/+source/"90 ... "http://launchpad.test/ubuntu/+series/breezy-autotest/+source/"
88 ... "commercialpackage/+changelog")91 ... "commercialpackage/+changelog")
89 >>> changelog = find_tag_by_id(92 >>> changelog = find_tag_by_id(
90 ... user_browser.contents, 'commercialpackage_1.0-1')93 ... user_browser.contents, 'commercialpackage_1.0-1')
91 >>> print(extract_text(changelog.find('a')))94 >>> print(extract_text(changelog.find('a')))
diff --git a/lib/lp/soyuz/stories/webservice/xx-archive.txt b/lib/lp/soyuz/stories/webservice/xx-archive.txt
index 8e2ddc6..290cf20 100644
--- a/lib/lp/soyuz/stories/webservice/xx-archive.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-archive.txt
@@ -478,7 +478,7 @@ component.
478We can use ``checkUpload`` to verify that a person can upload a478We can use ``checkUpload`` to verify that a person can upload a
479sourcepackage.479sourcepackage.
480480
481 >>> grumpy = user_webservice.get("/ubuntu/grumpy").jsonBody()481 >>> grumpy = user_webservice.get("/ubuntu/+series/grumpy").jsonBody()
482 >>> response = user_webservice.named_get(482 >>> response = user_webservice.named_get(
483 ... ubuntu['main_archive_link'], 'checkUpload',483 ... ubuntu['main_archive_link'], 'checkUpload',
484 ... distroseries=grumpy['self_link'],484 ... distroseries=grumpy['self_link'],
@@ -506,7 +506,7 @@ And we can see that it's gone:
506506
507And ``checkUpload`` now also no longer passes:507And ``checkUpload`` now also no longer passes:
508508
509 >>> grumpy = user_webservice.get("/ubuntu/grumpy").jsonBody()509 >>> grumpy = user_webservice.get("/ubuntu/+series/grumpy").jsonBody()
510 >>> response = user_webservice.named_get(510 >>> response = user_webservice.named_get(
511 ... ubuntu['main_archive_link'], 'checkUpload',511 ... ubuntu['main_archive_link'], 'checkUpload',
512 ... distroseries=grumpy['self_link'],512 ... distroseries=grumpy['self_link'],
@@ -664,7 +664,7 @@ newPocketUploader adds a new permission for a person to upload to a pocket.
664664
665The person named in the permission can upload a package to this pocket.665The person named in the permission can upload a package to this pocket.
666666
667 >>> grumpy = user_webservice.get("/ubuntu/grumpy").jsonBody()667 >>> grumpy = user_webservice.get("/ubuntu/+series/grumpy").jsonBody()
668 >>> response = user_webservice.named_get(668 >>> response = user_webservice.named_get(
669 ... ubuntu['main_archive_link'], 'checkUpload',669 ... ubuntu['main_archive_link'], 'checkUpload',
670 ... distroseries=grumpy['self_link'],670 ... distroseries=grumpy['self_link'],
@@ -745,7 +745,7 @@ It can also grant series-specific pocket queue admin permissions.
745745
746 >>> ubuntu_owner_ws = ubuntu_owner_webservice.get(746 >>> ubuntu_owner_ws = ubuntu_owner_webservice.get(
747 ... "/~ubuntu-owner").jsonBody()747 ... "/~ubuntu-owner").jsonBody()
748 >>> hoary = user_webservice.get("/ubuntu/hoary").jsonBody()748 >>> hoary = user_webservice.get("/ubuntu/+series/hoary").jsonBody()
749 >>> new_permissions = []749 >>> new_permissions = []
750 >>> for series in hoary, grumpy:750 >>> for series in hoary, grumpy:
751 ... response = ubuntu_owner_webservice.named_post(751 ... response = ubuntu_owner_webservice.named_post(
diff --git a/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt b/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
index 4c35b61..013d583 100644
--- a/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
@@ -79,7 +79,7 @@ Each binary publication exposes a number of properties:
79 date_removed: None79 date_removed: None
80 date_superseded: None80 date_superseded: None
81 display_name: 'mozilla-firefox 1.0 in warty hppa'81 display_name: 'mozilla-firefox 1.0 in warty hppa'
82 distro_arch_series_link: 'http://.../ubuntu/warty/hppa'82 distro_arch_series_link: 'http://.../ubuntu/+series/warty/hppa'
83 phased_update_percentage: None83 phased_update_percentage: None
84 pocket: 'Release'84 pocket: 'Release'
85 priority_name: 'IMPORTANT'85 priority_name: 'IMPORTANT'
diff --git a/lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt b/lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt
index a2a320b..8d8ec24 100644
--- a/lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt
@@ -12,7 +12,7 @@ operation:
12 >>> current_series = webservice.get(12 >>> current_series = webservice.get(
13 ... ubuntu['current_series_link']).jsonBody()13 ... ubuntu['current_series_link']).jsonBody()
14 >>> print(current_series['self_link'])14 >>> print(current_series['self_link'])
15 http://.../ubuntu/hoary15 http://.../ubuntu/+series/hoary
1616
17We'll first set up a buildd chroot, so we can check that its URL is17We'll first set up a buildd chroot, so we can check that its URL is
18exposed.18exposed.
@@ -37,7 +37,7 @@ For a distroarchseries we publish a subset of its attributes.
37 architecture_tag: 'i386'37 architecture_tag: 'i386'
38 chroot_url: 'http://.../.../filename...'38 chroot_url: 'http://.../.../filename...'
39 display_name: 'Ubuntu Hoary i386'39 display_name: 'Ubuntu Hoary i386'
40 distroseries_link: 'http://.../ubuntu/hoary'40 distroseries_link: 'http://.../ubuntu/+series/hoary'
41 is_nominated_arch_indep: True41 is_nominated_arch_indep: True
42 main_archive_link: 'http://.../ubuntu/+archive/primary'42 main_archive_link: 'http://.../ubuntu/+archive/primary'
43 official: True43 official: True
@@ -45,21 +45,21 @@ For a distroarchseries we publish a subset of its attributes.
45 package_count: 145 package_count: 1
46 processor_link: 'http://.../+processors/386'46 processor_link: 'http://.../+processors/386'
47 resource_type_link: 'http://.../#distro_arch_series'47 resource_type_link: 'http://.../#distro_arch_series'
48 self_link: 'http://.../ubuntu/hoary/i386'48 self_link: 'http://.../ubuntu/+series/hoary/i386'
49 supports_virtualized: True49 supports_virtualized: True
50 title: 'The Hoary Hedgehog Release for i386 (386)'50 title: 'The Hoary Hedgehog Release for i386 (386)'
51 web_link: 'http://launchpad.../ubuntu/hoary/i386'51 web_link: 'http://launchpad.../ubuntu/+series/hoary/i386'
5252
53DistroArchSeries.enabled is published in the API devel version.53DistroArchSeries.enabled is published in the API devel version.
5454
55 >>> distroarchseries = webservice.get(55 >>> distroarchseries = webservice.get(
56 ... "/ubuntu/hoary/i386", api_version='devel').jsonBody()56 ... "/ubuntu/+series/hoary/i386", api_version='devel').jsonBody()
5757
58 >>> pprint_entry(distroarchseries)58 >>> pprint_entry(distroarchseries)
59 architecture_tag: 'i386'59 architecture_tag: 'i386'
60 chroot_url: 'http://.../.../filename...'60 chroot_url: 'http://.../.../filename...'
61 display_name: 'Ubuntu Hoary i386'61 display_name: 'Ubuntu Hoary i386'
62 distroseries_link: 'http://.../ubuntu/hoary'62 distroseries_link: 'http://.../ubuntu/+series/hoary'
63 enabled: True63 enabled: True
64 is_nominated_arch_indep: True64 is_nominated_arch_indep: True
65 main_archive_link: 'http://.../ubuntu/+archive/primary'65 main_archive_link: 'http://.../ubuntu/+archive/primary'
@@ -68,7 +68,7 @@ DistroArchSeries.enabled is published in the API devel version.
68 package_count: 168 package_count: 1
69 processor_link: 'http://.../+processors/386'69 processor_link: 'http://.../+processors/386'
70 resource_type_link: 'http://.../#distro_arch_series'70 resource_type_link: 'http://.../#distro_arch_series'
71 self_link: 'http://.../ubuntu/hoary/i386'71 self_link: 'http://.../ubuntu/+series/hoary/i386'
72 supports_virtualized: True72 supports_virtualized: True
73 title: 'The Hoary Hedgehog Release for i386 (386)'73 title: 'The Hoary Hedgehog Release for i386 (386)'
74 web_link: 'http://launchpad.../ubuntu/hoary/i386'74 web_link: 'http://launchpad.../ubuntu/+series/hoary/i386'
diff --git a/lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt b/lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt
index 3246cca..314011e 100644
--- a/lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt
@@ -107,7 +107,7 @@ DistroSeries builds
107107
108DistroSeries, like ubuntu/hoary, allow users to call browse builds.108DistroSeries, like ubuntu/hoary, allow users to call browse builds.
109109
110 >>> hoary = webservice.get("/ubuntu/hoary").jsonBody()110 >>> hoary = webservice.get("/ubuntu/+series/hoary").jsonBody()
111 >>> hoary_builds = webservice.named_get(111 >>> hoary_builds = webservice.named_get(
112 ... hoary['self_link'], 'getBuildRecords').jsonBody()112 ... hoary['self_link'], 'getBuildRecords').jsonBody()
113113
diff --git a/lib/lp/soyuz/stories/webservice/xx-packageset.txt b/lib/lp/soyuz/stories/webservice/xx-packageset.txt
index 5622b17..e757ee3 100644
--- a/lib/lp/soyuz/stories/webservice/xx-packageset.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-packageset.txt
@@ -256,7 +256,7 @@ Every package set is associated with a distro series.
256 ... '/package-sets', 'getByName', {}, distroseries='/ubuntu/hoary',256 ... '/package-sets', 'getByName', {}, distroseries='/ubuntu/hoary',
257 ... name=u'mozilla').jsonBody()257 ... name=u'mozilla').jsonBody()
258 >>> print(mozilla['distroseries_link'])258 >>> print(mozilla['distroseries_link'])
259 http://api.launchpad.test/beta/ubuntu/hoary259 http://api.launchpad.test/beta/ubuntu/+series/hoary
260260
261 >>> print(mozilla['self_link'])261 >>> print(mozilla['self_link'])
262 http://api.launchpad.test/beta/package-sets/ubuntu/hoary/mozilla262 http://api.launchpad.test/beta/package-sets/ubuntu/hoary/mozilla
@@ -280,9 +280,9 @@ Related package sets
280When adding a package set we can specify that is to be related to another set280When adding a package set we can specify that is to be related to another set
281that exists already.281that exists already.
282282
283 >>> grumpy = webservice.get("/ubuntu/grumpy").jsonBody()283 >>> grumpy = webservice.get("/ubuntu/+series/grumpy").jsonBody()
284 >>> print(grumpy['self_link'])284 >>> print(grumpy['self_link'])
285 http://api.launchpad.test/beta/ubuntu/grumpy285 http://api.launchpad.test/beta/ubuntu/+series/grumpy
286286
287We are adding a new 'mozilla' package set to the 'grumpy' distro series and287We are adding a new 'mozilla' package set to the 'grumpy' distro series and
288it is related to 'mozilla' in 'hoary'.288it is related to 'mozilla' in 'hoary'.
@@ -300,7 +300,7 @@ it is related to 'mozilla' in 'hoary'.
300 ... '/package-sets', 'getByName', {}, name=u'mozilla',300 ... '/package-sets', 'getByName', {}, name=u'mozilla',
301 ... distroseries=grumpy['self_link']).jsonBody()301 ... distroseries=grumpy['self_link']).jsonBody()
302 >>> print(grumpy_mozilla['distroseries_link'])302 >>> print(grumpy_mozilla['distroseries_link'])
303 http://api.launchpad.test/beta/ubuntu/grumpy303 http://api.launchpad.test/beta/ubuntu/+series/grumpy
304304
305 >>> print(grumpy_mozilla['self_link'])305 >>> print(grumpy_mozilla['self_link'])
306 http://api.launchpad.test/beta/package-sets/ubuntu/grumpy/mozilla306 http://api.launchpad.test/beta/package-sets/ubuntu/grumpy/mozilla
@@ -729,10 +729,10 @@ The following query (note the additional 'distroseries' parameter) is
729thus equivalent:729thus equivalent:
730730
731 >>> print(ubuntu['current_series_link'])731 >>> print(ubuntu['current_series_link'])
732 http://api.launchpad.test/beta/ubuntu/hoary732 http://api.launchpad.test/beta/ubuntu/+series/hoary
733 >>> hoary = webservice.get("/ubuntu/hoary").jsonBody()733 >>> hoary = webservice.get("/ubuntu/+series/hoary").jsonBody()
734 >>> print(hoary['self_link'])734 >>> print(hoary['self_link'])
735 http://api.launchpad.test/beta/ubuntu/hoary735 http://api.launchpad.test/beta/ubuntu/+series/hoary
736736
737 >>> response = webservice.named_get(737 >>> response = webservice.named_get(
738 ... ubuntu['main_archive_link'], 'isSourceUploadAllowed',738 ... ubuntu['main_archive_link'], 'isSourceUploadAllowed',
diff --git a/lib/lp/soyuz/stories/webservice/xx-packageupload.txt b/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
index e88c342..5e3dc61 100644
--- a/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
@@ -25,11 +25,11 @@ Each record exposes a number of properties.
25 display_arches: 'source'25 display_arches: 'source'
26 display_name: 'mozilla-firefox'26 display_name: 'mozilla-firefox'
27 display_version: '0.9'27 display_version: '0.9'
28 distroseries_link: 'http://.../ubuntu/warty'28 distroseries_link: 'http://.../ubuntu/+series/warty'
29 id: 1129 id: 11
30 pocket: 'Release'30 pocket: 'Release'
31 resource_type_link: 'http://.../#package_upload'31 resource_type_link: 'http://.../#package_upload'
32 self_link: 'http://.../ubuntu/warty/+upload/11'32 self_link: 'http://.../ubuntu/+series/warty/+upload/11'
33 status: 'Done'33 status: 'Done'
3434
35getPackageUploads can filter on package names.35getPackageUploads can filter on package names.
diff --git a/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt b/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
index 4a8e1eb..971614c 100644
--- a/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
@@ -129,7 +129,7 @@ publication to play with first.
129 date_removed: None129 date_removed: None
130 date_superseded: None130 date_superseded: None
131 display_name: 'testwebservice 666 in breezy-autotest'131 display_name: 'testwebservice 666 in breezy-autotest'
132 distro_series_link: 'http://.../ubuntutest/breezy-autotest'132 distro_series_link: 'http://.../ubuntutest/+series/breezy-autotest'
133 package_creator_link: 'http://.../beta/~name16'133 package_creator_link: 'http://.../beta/~name16'
134 package_maintainer_link: 'http://.../beta/~name16'134 package_maintainer_link: 'http://.../beta/~name16'
135 package_signer_link: 'http://.../beta/~name16'135 package_signer_link: 'http://.../beta/~name16'
diff --git a/lib/lp/testing/pages.py b/lib/lp/testing/pages.py
index 71045f0..47a9021 100644
--- a/lib/lp/testing/pages.py
+++ b/lib/lp/testing/pages.py
@@ -509,7 +509,7 @@ def print_portlet_links(content, name, base=None):
509 >>> print_portlet_links(admin_browser.contents,'Milestone milestone3 for509 >>> print_portlet_links(admin_browser.contents,'Milestone milestone3 for
510 Ubuntu details')510 Ubuntu details')
511 Ubuntu: /ubuntu511 Ubuntu: /ubuntu
512 Warty: /ubuntu/warty512 Warty: /ubuntu/+series/warty
513 --------------513 --------------
514 """514 """
515515
diff --git a/lib/lp/translations/browser/tests/pofile-views.txt b/lib/lp/translations/browser/tests/pofile-views.txt
index 2221e92..36c68b9 100644
--- a/lib/lp/translations/browser/tests/pofile-views.txt
+++ b/lib/lp/translations/browser/tests/pofile-views.txt
@@ -501,4 +501,4 @@ index page.
501And we are redirected to the index page, as expected:501And we are redirected to the index page, as expected:
502502
503 >>> print(pofile_view.request.response.getHeader('Location'))503 >>> print(pofile_view.request.response.getHeader('Location'))
504 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es504 http://trans.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es
diff --git a/lib/lp/translations/browser/tests/test_breadcrumbs.py b/lib/lp/translations/browser/tests/test_breadcrumbs.py
index 0032e78..84ea513 100644
--- a/lib/lp/translations/browser/tests/test_breadcrumbs.py
+++ b/lib/lp/translations/browser/tests/test_breadcrumbs.py
@@ -61,7 +61,7 @@ class TestTranslationsFacetBreadcrumb(BaseBreadcrumbTestCase):
61 ("Translations",61 ("Translations",
62 'http://translations.launchpad.test/crumb-tester'),62 'http://translations.launchpad.test/crumb-tester'),
63 ("Test (1.0)",63 ("Test (1.0)",
64 'http://translations.launchpad.test/crumb-tester/test')],64 'http://translations.launchpad.test/crumb-tester/+series/test')],
65 series, rootsite='translations')65 series, rootsite='translations')
6666
67 def test_project(self):67 def test_project(self):
@@ -124,10 +124,10 @@ class TestSeriesLanguageBreadcrumbs(BaseBreadcrumbTestCase):
124 ("Translations",124 ("Translations",
125 "http://translations.launchpad.test/crumb-tester"),125 "http://translations.launchpad.test/crumb-tester"),
126 ("Test (1.0)",126 ("Test (1.0)",
127 "http://translations.launchpad.test/crumb-tester/test"),127 "http://translations.launchpad.test/crumb-tester/+series/test"),
128 ("Serbian (sr)",128 ("Serbian (sr)",
129 "http://translations.launchpad.test/"129 "http://translations.launchpad.test/"
130 "crumb-tester/test/+lang/sr")],130 "crumb-tester/+series/test/+lang/sr")],
131 serieslanguage)131 serieslanguage)
132132
133 def test_productserieslanguage(self):133 def test_productserieslanguage(self):
diff --git a/lib/lp/translations/doc/canonical_url_examples.txt b/lib/lp/translations/doc/canonical_url_examples.txt
index 3b1acb8..743ed4b 100644
--- a/lib/lp/translations/doc/canonical_url_examples.txt
+++ b/lib/lp/translations/doc/canonical_url_examples.txt
@@ -44,7 +44,7 @@ And here's our subset.
44 ... distroseries=hoary, sourcepackagename=sourcepackagename)44 ... distroseries=hoary, sourcepackagename=sourcepackagename)
4545
46 >>> canonical_url(potemplatesubset)46 >>> canonical_url(potemplatesubset)
47 u'http://launchpad.test/ubuntu/hoary/+source/evolution/+pots'47 u'http://launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots'
4848
49We can get a particular PO template for this source package by its PO template49We can get a particular PO template for this source package by its PO template
50name.50name.
@@ -140,7 +140,7 @@ Distribution and distribution series default to the main vhost.
140 >>> distroseries = factory.makeDistroSeries(140 >>> distroseries = factory.makeDistroSeries(
141 ... name='bah', distribution=distribution)141 ... name='bah', distribution=distribution)
142 >>> canonical_url(distroseries)142 >>> canonical_url(distroseries)
143 u'http://launchpad.test/boo/bah'143 u'http://launchpad.test/boo/+series/bah'
144144
145DistroSeriesLanguage objects have their URLs on translations vhost.145DistroSeriesLanguage objects have their URLs on translations vhost.
146146
@@ -152,7 +152,7 @@ DistroSeriesLanguage objects have their URLs on translations vhost.
152 >>> boo_bah_serbian = getUtility(IDistroSeriesLanguageSet).getDummy(152 >>> boo_bah_serbian = getUtility(IDistroSeriesLanguageSet).getDummy(
153 ... distroseries, serbian)153 ... distroseries, serbian)
154 >>> canonical_url(boo_bah_serbian)154 >>> canonical_url(boo_bah_serbian)
155 u'http://translations.launchpad.test/boo/bah/+lang/sr'155 u'http://translations.launchpad.test/boo/+series/bah/+lang/sr'
156156
157Product, ProductSeries and ProductSeriesLanguage157Product, ProductSeries and ProductSeriesLanguage
158---------------------------------------------------158---------------------------------------------------
diff --git a/lib/lp/translations/doc/poexport-request.txt b/lib/lp/translations/doc/poexport-request.txt
index cf6d13f..ef06aad 100644
--- a/lib/lp/translations/doc/poexport-request.txt
+++ b/lib/lp/translations/doc/poexport-request.txt
@@ -52,7 +52,7 @@ The user receives a confirmation email.
52 >>> emails = pop_notifications()52 >>> emails = pop_notifications()
53 >>> len(emails)53 >>> len(emails)
54 154 1
55 >>> print_emails(notifications=emails)55 >>> print_emails(notifications=emails, decode=True)
56 From: ...56 From: ...
57 To: downloader@example.com57 To: downloader@example.com
58 Subject: Launchpad translation download: Ubuntu Hoary pmount -58 Subject: Launchpad translation download: Ubuntu Hoary pmount -
@@ -70,8 +70,9 @@ The user receives a confirmation email.
70 <BLANKLINE>70 <BLANKLINE>
71 http://translations.launchpad.../hoary/+source/pmount/+pots/p...71 http://translations.launchpad.../hoary/+source/pmount/+pots/p...
72 <BLANKLINE>72 <BLANKLINE>
73 -- =73 --
74 Automatic message from Launchpad.net.74 Automatic message from Launchpad.net.
75 <BLANKLINE>
75 ----------------------------------------76 ----------------------------------------
7677
77The email contains a URL linking to where the exported file can be downloaded.78The email contains a URL linking to where the exported file can be downloaded.
diff --git a/lib/lp/translations/stories/distribution/xx-distribution-translations.txt b/lib/lp/translations/stories/distribution/xx-distribution-translations.txt
index d5e30aa..791505f 100644
--- a/lib/lp/translations/stories/distribution/xx-distribution-translations.txt
+++ b/lib/lp/translations/stories/distribution/xx-distribution-translations.txt
@@ -49,11 +49,11 @@ Now, we are going to check that the language list we got is pointing
49to the right translation focus.49to the right translation focus.
5050
51 >>> print(browser.getLink('Spanish').url)51 >>> print(browser.getLink('Spanish').url)
52 http://translations.launchpad.test/ubuntu/hoary/+lang/es52 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/es
53 >>> print(browser.getLink('Italian').url)53 >>> print(browser.getLink('Italian').url)
54 http://translations.launchpad.test/ubuntu/hoary/+lang/it54 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/it
55 >>> print(browser.getLink('Portuguese (Brazil)').url)55 >>> print(browser.getLink('Portuguese (Brazil)').url)
56 http://translations.launchpad.test/ubuntu/hoary/+lang/pt_BR56 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/pt_BR
5757
58And the other Ubuntu distributions should be there too.58And the other Ubuntu distributions should be there too.
5959
@@ -70,11 +70,11 @@ We are not showing its translation status here, so we should have
70links to their particular translation status.70links to their particular translation status.
7171
72 >>> print(browser.getLink('Breezy Badger Autotest (6.6.6)').url)72 >>> print(browser.getLink('Breezy Badger Autotest (6.6.6)').url)
73 http://translations.launchpad.test/ubuntu/breezy-autotest73 http://translations.launchpad.test/ubuntu/+series/breezy-autotest
74 >>> print(browser.getLink('Grumpy (5.10)').url)74 >>> print(browser.getLink('Grumpy (5.10)').url)
75 http://translations.launchpad.test/ubuntu/grumpy75 http://translations.launchpad.test/ubuntu/+series/grumpy
76 >>> print(browser.getLink('Warty (4.10)').url)76 >>> print(browser.getLink('Warty (4.10)').url)
77 http://translations.launchpad.test/ubuntu/warty77 http://translations.launchpad.test/ubuntu/+series/warty
7878
79But we are already showing the status for the translation focus one,79But we are already showing the status for the translation focus one,
80we should not have a link to it.80we should not have a link to it.
@@ -106,7 +106,7 @@ It doesn't have any translation, so we will get the default GeoIP
106languages pointing to the latest release, Hoary.106languages pointing to the latest release, Hoary.
107107
108 >>> print(browser.getLink('Zulu').url)108 >>> print(browser.getLink('Zulu').url)
109 http://translations.launchpad.test/debian/sarge/+lang/zu109 http://translations.launchpad.test/debian/+series/sarge/+lang/zu
110110
111And the other Ubuntu distributions should be there too.111And the other Ubuntu distributions should be there too.
112112
@@ -122,9 +122,9 @@ We are not showing its translation status here, so we should have
122links to their particular translation status.122links to their particular translation status.
123123
124 >>> print(browser.getLink('Sid (3.2)').url)124 >>> print(browser.getLink('Sid (3.2)').url)
125 http://translations.launchpad.test/debian/sid125 http://translations.launchpad.test/debian/+series/sid
126 >>> print(browser.getLink('Woody (3.0)').url)126 >>> print(browser.getLink('Woody (3.0)').url)
127 http://translations.launchpad.test/debian/woody127 http://translations.launchpad.test/debian/+series/woody
128128
129But we are already showing the status for the translation focus one,129But we are already showing the status for the translation focus one,
130we should not have a link to it.130we should not have a link to it.
diff --git a/lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt b/lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt
index 167459c..9ea06c6 100644
--- a/lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt
+++ b/lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt
@@ -16,7 +16,7 @@ To reach that page we go to the distro series page and follow the link to
16the language pack admin page.16the language pack admin page.
1717
18 >>> admin_browser.open(18 >>> admin_browser.open(
19 ... 'http://translations.launchpad.test/ubuntu/hoary')19 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
20 >>> admin_browser.getLink('See all language packs').click()20 >>> admin_browser.getLink('See all language packs').click()
2121
22Initially, there is no package selected and there are options for choosing a22Initially, there is no package selected and there are options for choosing a
@@ -39,7 +39,7 @@ Let's select a base one:
39 >>> base.displayValue = ['2007-09-10 19:14:26 UTC']39 >>> base.displayValue = ['2007-09-10 19:14:26 UTC']
40 >>> admin_browser.getControl('Change').click()40 >>> admin_browser.getControl('Change').click()
41 >>> print(admin_browser.url)41 >>> print(admin_browser.url)
42 http://translations.launchpad.test/ubuntu/hoary/+language-packs42 http://translations.launchpad.test/ubuntu/+series/hoary/+language-packs
4343
44Now the admin page will show us that language pack selected and a list of44Now the admin page will show us that language pack selected and a list of
45available update packages.45available update packages.
@@ -56,7 +56,7 @@ available update packages.
5656
57Those changes are shown in the public language pack listing web page:57Those changes are shown in the public language pack listing web page:
5858
59 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary')59 >>> browser.open('http://translations.launchpad.test/ubuntu/+series/hoary')
60 >>> browser.getLink('See all language packs').click()60 >>> browser.getLink('See all language packs').click()
61 >>> print(extract_text(61 >>> print(extract_text(
62 ... find_tag_by_id(browser.contents, "language_packs")))62 ... find_tag_by_id(browser.contents, "language_packs")))
@@ -90,7 +90,7 @@ URL uses '+latest-full-language-pack'.
90 >>> print(browser.getLink('2007-09-10 19:14:26 UTC').url)90 >>> print(browser.getLink('2007-09-10 19:14:26 UTC').url)
91 http.../71/ubuntu-hoary-translations.tar.gz91 http.../71/ubuntu-hoary-translations.tar.gz
92 >>> print(browser.getLink('2007-09-10 19:16:01 UTC').url)92 >>> print(browser.getLink('2007-09-10 19:16:01 UTC').url)
93 http://translations.launchpad.test/ubuntu/hoary/+latest-full-language-pack93 http://translations.launchpad.test/ubuntu/+series/hoary/+latest-full-language-pack
9494
95An administrator can choose the current update pack and there is also an95An administrator can choose the current update pack and there is also an
96option to set/unset whether next language pack generation is a full export:96option to set/unset whether next language pack generation is a full export:
@@ -104,7 +104,7 @@ option to set/unset whether next language pack generation is a full export:
104 ... 'Request a full language pack export').selected = True104 ... 'Request a full language pack export').selected = True
105 >>> admin_browser.getControl('Change').click()105 >>> admin_browser.getControl('Change').click()
106 >>> print(admin_browser.url)106 >>> print(admin_browser.url)
107 http://translations.launchpad.test/ubuntu/hoary/+language-packs107 http://translations.launchpad.test/ubuntu/+series/hoary/+language-packs
108 >>> print_feedback_messages(admin_browser.contents)108 >>> print_feedback_messages(admin_browser.contents)
109 Your request has been noted. Next language pack export will include109 Your request has been noted. Next language pack export will include
110 all available translations...110 all available translations...
@@ -122,7 +122,7 @@ cron, it will do a full export of translations for this distro series.
122The language pack changes are visible on the public language pack page:122The language pack changes are visible on the public language pack page:
123123
124 >>> browser.open(124 >>> browser.open(
125 ... 'http://translations.launchpad.test/ubuntu/hoary/+language-packs')125 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+language-packs')
126 >>> print(extract_text(126 >>> print(extract_text(
127 ... find_tag_by_id(browser.contents, "language_packs")))127 ... find_tag_by_id(browser.contents, "language_packs")))
128 A language pack...128 A language pack...
@@ -154,4 +154,4 @@ URL uses '+latest-full-language-pack'.
154 >>> print(browser.getLink('2007-09-10 19:15:01 UTC').url)154 >>> print(browser.getLink('2007-09-10 19:15:01 UTC').url)
155 http.../72/ubuntu-hoary-translations-update.tar.gz155 http.../72/ubuntu-hoary-translations-update.tar.gz
156 >>> print(browser.getLink('2007-09-10 19:15:19 UTC').url)156 >>> print(browser.getLink('2007-09-10 19:15:19 UTC').url)
157 http://translations.launchpad.test/ubuntu/hoary/+latest-delta-language-pack157 http://translations.launchpad.test/ubuntu/+series/hoary/+latest-delta-language-pack
diff --git a/lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt b/lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt
index fa97ec4..c7118fa 100644
--- a/lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt
+++ b/lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt
@@ -6,7 +6,8 @@ packages in a particular distibution series.
66
7In this case, we're asking for the translation overview for Hoary.7In this case, we're asking for the translation overview for Hoary.
88
9 >>> anon_browser.open('http://translations.launchpad.test/ubuntu/hoary')9 >>> anon_browser.open(
10 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
1011
11The system is not showing non visible languages:12The system is not showing non visible languages:
1213
@@ -25,7 +26,7 @@ The system will not show English because it is not translatable:
25But it shows the ones not hidden:26But it shows the ones not hidden:
2627
27 >>> print(anon_browser.getLink('Spanish').url)28 >>> print(anon_browser.getLink('Spanish').url)
28 http://translations.launchpad.test/ubuntu/hoary/+lang/es29 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/es
2930
30Launchpad has an option to hide all of the translations for a distribution31Launchpad has an option to hide all of the translations for a distribution
31series. The link to hide translations is not available to anonymous users:32series. The link to hide translations is not available to anonymous users:
@@ -38,7 +39,7 @@ series. The link to hide translations is not available to anonymous users:
38And the page is not available either:39And the page is not available either:
3940
40 >>> anon_browser.open(41 >>> anon_browser.open(
41 ... 'http://translations.launchpad.test/ubuntu/hoary/'42 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
42 ... '+translations-admin')43 ... '+translations-admin')
43 Traceback (most recent call last):44 Traceback (most recent call last):
44 ...45 ...
@@ -47,7 +48,8 @@ And the page is not available either:
47... but the link is available to administrators:48... but the link is available to administrators:
4849
49 >>> dtc_browser = setupDTCBrowser()50 >>> dtc_browser = setupDTCBrowser()
50 >>> dtc_browser.open('http://translations.launchpad.test/ubuntu/hoary')51 >>> dtc_browser.open(
52 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
51 >>> dtc_browser.getLink('Change settings').click()53 >>> dtc_browser.getLink('Change settings').click()
5254
53Once the administrator hides all translations...55Once the administrator hides all translations...
@@ -56,7 +58,7 @@ Once the administrator hides all translations...
56 ... 'Hide translations for this release').selected = True58 ... 'Hide translations for this release').selected = True
57 >>> dtc_browser.getControl('Change').click()59 >>> dtc_browser.getControl('Change').click()
58 >>> print(dtc_browser.url)60 >>> print(dtc_browser.url)
59 http://translations.launchpad.test/ubuntu/hoary61 http://translations.launchpad.test/ubuntu/+series/hoary
6062
61...a notice about the fact shows up on the overview page.63...a notice about the fact shows up on the overview page.
6264
@@ -69,7 +71,8 @@ Once the administrator hides all translations...
69Now, the translation status page will no longer display any languages to71Now, the translation status page will no longer display any languages to
70regular users.72regular users.
7173
72 >>> user_browser.open('http://translations.launchpad.test/ubuntu/hoary')74 >>> user_browser.open(
75 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
73 Traceback (most recent call last):76 Traceback (most recent call last):
74 ...77 ...
75 TranslationUnavailable: ...78 TranslationUnavailable: ...
@@ -79,7 +82,7 @@ the system tells them that they're not allowed to see those pages.
7982
80 >>> user_browser.handleErrors = True83 >>> user_browser.handleErrors = True
81 >>> user_browser.open(84 >>> user_browser.open(
82 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/es')85 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/es')
83 Traceback (most recent call last):86 Traceback (most recent call last):
84 ...87 ...
85 HTTPError: HTTP Error 503: Service Unavailable88 HTTPError: HTTP Error 503: Service Unavailable
@@ -92,20 +95,21 @@ the system tells them that they're not allowed to see those pages.
92Translations administrator have access series with hidden translations.95Translations administrator have access series with hidden translations.
9396
94 >>> dtc_browser.open(97 >>> dtc_browser.open(
95 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/es')98 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/es')
9699
97Non existing languages are not viewable. English is a special case100Non existing languages are not viewable. English is a special case
98in that we store the translatable messages as English, so it cannot101in that we store the translatable messages as English, so it cannot
99should not viewed102should not viewed
100103
101 >>> user_browser.open(104 >>> user_browser.open(
102 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/notexists')105 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/'
106 ... 'notexists')
103 Traceback (most recent call last):107 Traceback (most recent call last):
104 ...108 ...
105 NotFound: ...109 NotFound: ...
106110
107 >>> user_browser.open(111 >>> user_browser.open(
108 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/en')112 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/en')
109 Traceback (most recent call last):113 Traceback (most recent call last):
110 ...114 ...
111 NotFound: ...115 NotFound: ...
@@ -114,7 +118,7 @@ Translation pages for source packages are also unavailable to
114non-administrative users.118non-administrative users.
115119
116 >>> user_browser.open(120 >>> user_browser.open(
117 ... 'http://translations.launchpad.test/ubuntu/hoary/'121 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
118 ... '+sources/evolution/+pots/evolution-2.2')122 ... '+sources/evolution/+pots/evolution-2.2')
119 Traceback (most recent call last):123 Traceback (most recent call last):
120 ...124 ...
@@ -124,14 +128,15 @@ However, source package translations are still available to the
124administrators.128administrators.
125129
126 >>> dtc_browser.open(130 >>> dtc_browser.open(
127 ... 'http://translations.launchpad.test/ubuntu/hoary/'131 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
128 ... '+sources/evolution/+pots/evolution-2.2')132 ... '+sources/evolution/+pots/evolution-2.2')
129133
130There is also an option to set/unset whether translation imports for a134There is also an option to set/unset whether translation imports for a
131distribution should be deferred. That option is set also from the same135distribution should be deferred. That option is set also from the same
132form where we hide all translations and an admin is able to change it:136form where we hide all translations and an admin is able to change it:
133137
134 >>> dtc_browser.open('http://translations.launchpad.test/ubuntu/hoary')138 >>> dtc_browser.open(
139 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
135 >>> dtc_browser.getLink('Change settings').click()140 >>> dtc_browser.getLink('Change settings').click()
136 >>> dtc_browser.getControl(141 >>> dtc_browser.getControl(
137 ... 'Defer translation imports').selected142 ... 'Defer translation imports').selected
@@ -140,7 +145,7 @@ form where we hide all translations and an admin is able to change it:
140 ... 'Defer translation imports').selected = True145 ... 'Defer translation imports').selected = True
141 >>> dtc_browser.getControl('Change').click()146 >>> dtc_browser.getControl('Change').click()
142 >>> print(dtc_browser.url)147 >>> print(dtc_browser.url)
143 http://translations.launchpad.test/ubuntu/hoary148 http://translations.launchpad.test/ubuntu/+series/hoary
144149
145Once the system accepts the submission, we can see such change applied.150Once the system accepts the submission, we can see such change applied.
146151
diff --git a/lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt b/lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt
index 7910e05..1535c1e 100644
--- a/lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt
+++ b/lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt
@@ -279,7 +279,7 @@ Carlos uploads files for Evolution in Ubuntu Hoary.
279 >>> import transaction279 >>> import transaction
280 >>> from io import BytesIO280 >>> from io import BytesIO
281 >>> admin_browser.open(281 >>> admin_browser.open(
282 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'282 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
283 ... 'evolution/+pots/evolution-2.2/+upload')283 ... 'evolution/+pots/evolution-2.2/+upload')
284 >>> file_ctrl = admin_browser.getControl('File:')284 >>> file_ctrl = admin_browser.getControl('File:')
285 >>> file_ctrl.add_file(285 >>> file_ctrl.add_file(
diff --git a/lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt b/lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt
index 6de7820..235db51 100644
--- a/lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt
+++ b/lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt
@@ -29,7 +29,8 @@ There is no content for Ubuntu.
2929
30The import queue is linked from the translations page for distribution series.30The import queue is linked from the translations page for distribution series.
3131
32 >>> user_browser.open('http://translations.launchpad.test/ubuntu/hoary')32 >>> user_browser.open(
33 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
33 >>> user_browser.getLink('Hoary import queue').click()34 >>> user_browser.getLink('Hoary import queue').click()
3435
35And obviously, given that the ubuntu distribution had no content, Hoary, an36And obviously, given that the ubuntu distribution had no content, Hoary, an
diff --git a/lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt b/lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt
index 8e9f427..8b93af3 100644
--- a/lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt
+++ b/lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt
@@ -107,8 +107,8 @@ to where we can edit imports.
107Now, we attach a new file to an already existing translation resource.107Now, we attach a new file to an already existing translation resource.
108108
109 >>> browser.open(109 >>> browser.open(
110 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'110 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
111 ... '+pots/evolution-2.2/+upload')111 ... 'evolution/+pots/evolution-2.2/+upload')
112 >>> upload = browser.getControl('File')112 >>> upload = browser.getControl('File')
113 >>> upload113 >>> upload
114 <Control name='file' type='file'>114 <Control name='file' type='file'>
@@ -117,7 +117,7 @@ Now, we attach a new file to an already existing translation resource.
117 ... 'text/x-gettext-translation-template', 'evolution.pot')117 ... 'text/x-gettext-translation-template', 'evolution.pot')
118 >>> browser.getControl('Upload').click()118 >>> browser.getControl('Upload').click()
119 >>> print(browser.url)119 >>> print(browser.url)
120 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+upload120 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/+upload
121 >>> for tag in find_tags_by_class(browser.contents, 'message'):121 >>> for tag in find_tags_by_class(browser.contents, 'message'):
122 ... print(tag.renderContents())122 ... print(tag.renderContents())
123 Thank you for your upload. It will be automatically reviewed...123 Thank you for your upload. It will be automatically reviewed...
@@ -362,7 +362,7 @@ Let's try breaking the form by not supplying a file object. It give us a
362decent error message:362decent error message:
363363
364 >>> browser.open(364 >>> browser.open(
365 ... 'http://translations.launchpad.test/ubuntu/hoary/'365 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
366 ... '+source/evolution/+pots/evolution-2.2/+upload')366 ... '+source/evolution/+pots/evolution-2.2/+upload')
367 >>> browser.getControl('Upload').click()367 >>> browser.getControl('Upload').click()
368 >>> for tag in find_tags_by_class(browser.contents, 'message'):368 >>> for tag in find_tags_by_class(browser.contents, 'message'):
diff --git a/lib/lp/translations/stories/navigation-links/pofile.txt b/lib/lp/translations/stories/navigation-links/pofile.txt
index 4f2bbc6..f72afd1 100644
--- a/lib/lp/translations/stories/navigation-links/pofile.txt
+++ b/lib/lp/translations/stories/navigation-links/pofile.txt
@@ -24,10 +24,10 @@ The Application tabs should point to IProduct URLs.
24Taking an IPOFile for ISourcePackage context:24Taking an IPOFile for ISourcePackage context:
2525
26 >>> admin_browser.open(26 >>> admin_browser.open(
27 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'27 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
28 ... '+pots/evolution-2.2/es')28 ... 'evolution/+pots/evolution-2.2/es')
29 >>> print(admin_browser.url)29 >>> print(admin_browser.url)
30 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es30 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es
3131
32The Application tabs should point to IDistributionSourcePackage URLs.32The Application tabs should point to IDistributionSourcePackage URLs.
3333
diff --git a/lib/lp/translations/stories/navigation-links/pomsgset.txt b/lib/lp/translations/stories/navigation-links/pomsgset.txt
index be40c03..5340696 100644
--- a/lib/lp/translations/stories/navigation-links/pomsgset.txt
+++ b/lib/lp/translations/stories/navigation-links/pomsgset.txt
@@ -26,14 +26,14 @@ The Application tabs should point to IProductSeries URLs.
26Taking an IPOMsgSet for ISourcePackage context:26Taking an IPOMsgSet for ISourcePackage context:
2727
28 >>> browser.open(28 >>> browser.open(
29 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'29 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
30 ... '+pots/evolution-2.2/es/1')30 ... 'evolution/+pots/evolution-2.2/es/1')
3131
32We get a +translate page because that's the only page for an IPOMsgSet and the32We get a +translate page because that's the only page for an IPOMsgSet and the
33system forwards automatically there.33system forwards automatically there.
3434
35 >>> print(browser.url)35 >>> print(browser.url)
36 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate36 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate
3737
38The Application tabs should point to ISourcePackage URLs.38The Application tabs should point to ISourcePackage URLs.
3939
diff --git a/lib/lp/translations/stories/navigation-links/potemplate.txt b/lib/lp/translations/stories/navigation-links/potemplate.txt
index e138b54..43bba91 100644
--- a/lib/lp/translations/stories/navigation-links/potemplate.txt
+++ b/lib/lp/translations/stories/navigation-links/potemplate.txt
@@ -22,10 +22,10 @@ The Application tabs should point to IProduct URLs.
22Taking an IPOTemplate for ISourcePackage context:22Taking an IPOTemplate for ISourcePackage context:
2323
24 >>> admin_browser.open(24 >>> admin_browser.open(
25 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'25 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
26 ... '+pots/evolution-2.2')26 ... 'evolution/+pots/evolution-2.2')
27 >>> print(admin_browser.url)27 >>> print(admin_browser.url)
28 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.228 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2
2929
30The Application tabs should point to IDistributionSourcePackage URLs.30The Application tabs should point to IDistributionSourcePackage URLs.
3131
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-details.txt b/lib/lp/translations/stories/standalone/xx-pofile-details.txt
index 888e2fb..53d7736 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-details.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-details.txt
@@ -161,7 +161,7 @@ We'll create two new accounts to demonstrate this.
161161
162 >>> browser.open(162 >>> browser.open(
163 ... ("http://translations.launchpad.test/"163 ... ("http://translations.launchpad.test/"
164 ... "ubuntu/hoary/+source/%s/+pots/%s/%s/+details") % (164 ... "ubuntu/+series/hoary/+source/%s/+pots/%s/%s/+details") % (
165 ... package.name, template.name, language_code))165 ... package.name, template.name, language_code))
166 >>> main_text = extract_text(find_main_content(browser.contents))166 >>> main_text = extract_text(find_main_content(browser.contents))
167 >>> print(main_text)167 >>> print(main_text)
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-export.txt b/lib/lp/translations/stories/standalone/xx-pofile-export.txt
index fef4485..25e7bf8 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-export.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-export.txt
@@ -4,7 +4,7 @@ Exporting Single PO Files through the Web
4Not logged in users can't access the +export page.4Not logged in users can't access the +export page.
55
6 >>> anon_browser.open(6 >>> anon_browser.open(
7 ... 'http://translations.launchpad.test/ubuntu/hoary'7 ... 'http://translations.launchpad.test/ubuntu/+series/hoary'
8 ... '/+source/evolution/+pots/evolution-2.2/es/')8 ... '/+source/evolution/+pots/evolution-2.2/es/')
9 >>> anon_browser.getLink('Download').click()9 >>> anon_browser.getLink('Download').click()
10 Traceback (most recent call last):10 Traceback (most recent call last):
@@ -14,7 +14,7 @@ Not logged in users can't access the +export page.
14Logged in as a regular user, the +export page is accessible.14Logged in as a regular user, the +export page is accessible.
1515
16 >>> user_browser.open(16 >>> user_browser.open(
17 ... 'http://translations.launchpad.test/ubuntu/hoary'17 ... 'http://translations.launchpad.test/ubuntu/+series/hoary'
18 ... '/+source/evolution/+pots/evolution-2.2/es')18 ... '/+source/evolution/+pots/evolution-2.2/es')
19 >>> user_browser.getLink('Download').click()19 >>> user_browser.getLink('Download').click()
2020
@@ -34,7 +34,7 @@ If we POST the page, it should add the request to the queue.
34 >>> user_browser.getControl(name='format').value = ['PO']34 >>> user_browser.getControl(name='format').value = ['PO']
35 >>> user_browser.getControl('Request Download').click()35 >>> user_browser.getControl('Request Download').click()
36 >>> print(user_browser.url)36 >>> print(user_browser.url)
37 http://translatio.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es37 http://translatio.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es
3838
39 >>> for tag in find_tags_by_class(user_browser.contents, 'informational'):39 >>> for tag in find_tags_by_class(user_browser.contents, 'informational'):
40 ... tag.renderContents()40 ... tag.renderContents()
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt
index 070d946..c2a171c 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt
@@ -42,7 +42,7 @@ alternative suggestions. We do not offer suggestions from standard English
42since that is the one language we always translate from, never to.42since that is the one language we always translate from, never to.
4343
44 >>> translate_page = (44 >>> translate_page = (
45 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'45 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
46 ... 'evolution/+pots/evolution-2.2/es/+translate')46 ... 'evolution/+pots/evolution-2.2/es/+translate')
47 >>> anon_browser.open(translate_page)47 >>> anon_browser.open(translate_page)
48 >>> get_alternative_languages_widget(anon_browser).displayOptions[:4]48 >>> get_alternative_languages_widget(anon_browser).displayOptions[:4]
@@ -239,7 +239,7 @@ If a user specifies more than one alternative language in the URL, they
239get an UnexpectedFormData exception:239get an UnexpectedFormData exception:
240240
241 >>> browser.open(241 >>> browser.open(
242 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'242 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
243 ... 'evolution/+pots/evolution-2.2/es/+translate'243 ... 'evolution/+pots/evolution-2.2/es/+translate'
244 ... '?field.alternative_language=ja&field.alternative_language=aj')244 ... '?field.alternative_language=ja&field.alternative_language=aj')
245 Traceback (most recent call last):245 Traceback (most recent call last):
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt
index 767035d..452c159 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt
@@ -2,8 +2,8 @@ Checks that an empty translation is not checked with pygettextpo
22
3 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')3 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
4 >>> browser.open(4 >>> browser.open(
5 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'5 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
6 ... '+pots/evolution-2.2/es/+translate?start=12&batch=1')6 ... 'evolution/+pots/evolution-2.2/es/+translate?start=12&batch=1')
77
8The msgid for msgset_142 uses a format string ('%s') and that means that the8The msgid for msgset_142 uses a format string ('%s') and that means that the
9translation should use it too. If the translation is empty, our validation9translation should use it too. If the translation is empty, our validation
@@ -27,4 +27,4 @@ We should be redirected to the next page because the validation didn't get
27it as an error.27it as an error.
2828
29 >>> print(browser.url)29 >>> print(browser.url)
30 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?batch=1&memo=13&start=1330 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?batch=1&memo=13&start=13
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt
index 574be01..e2a34f0 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt
@@ -4,8 +4,8 @@ messages for this POFile, we still detect the error and notify to our users.
44
5 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')5 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
6 >>> browser.open(6 >>> browser.open(
7 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'7 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
8 ... '+pots/evolution-2.2/es/+translate?start=10&batch=5')8 ... 'evolution/+pots/evolution-2.2/es/+translate?start=10&batch=5')
99
10Submit the form using a wrong format string. The msgid is using '%s' which10Submit the form using a wrong format string. The msgid is using '%s' which
11means it will be an string, but we are going to use '%i' which means an11means it will be an string, but we are going to use '%i' which means an
@@ -32,7 +32,7 @@ And submit the form.
32We remain at the same page:32We remain at the same page:
3333
34 >>> print(browser.url)34 >>> print(browser.url)
35 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=10&batch=535 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=10&batch=5
3636
37The valid translation is stored:37The valid translation is stored:
3838
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt
index e528f7f..66e1425 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt
@@ -2,8 +2,8 @@ This check will be sure that we are escaping correctly html tags
2inside textareas.2inside textareas.
33
4 >>> user_browser.open(4 >>> user_browser.open(
5 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/pmount/'5 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
6 ... '+pots/pmount/hr/+translate')6 ... 'pmount/+pots/pmount/hr/+translate')
77
8We are going to assign a value with html tags to see that we escape it when8We are going to assign a value with html tags to see that we escape it when
9rendered as part of a textarea. As we want to see what we get back inside a9rendered as part of a textarea. As we want to see what we get back inside a
@@ -20,7 +20,7 @@ textarea, and
20We are in next form page.20We are in next form page.
2121
22 >>> print(user_browser.url)22 >>> print(user_browser.url)
23 http://translations.launchpad.test/ubuntu/hoary/+source/pmount/+pots/pmount/hr/+translate?memo=10&start=1023 http://translations.launchpad.test/ubuntu/+series/hoary/+source/pmount/+pots/pmount/hr/+translate?memo=10&start=10
2424
25Let's go back to the modified message.25Let's go back to the modified message.
2626
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt
index 0461004..a842cfd 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt
@@ -13,8 +13,8 @@ the separator in language codes rather than an underscore.
1313
14 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')14 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
15 >>> browser.open(15 >>> browser.open(
16 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'16 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
17 ... '+pots/evolution-2.2/en_AU/+translate')17 ... 'evolution/+pots/evolution-2.2/en_AU/+translate')
18 >>> control = browser.getControl(name="msgset_130_en_AU_translation_0_new")18 >>> control = browser.getControl(name="msgset_130_en_AU_translation_0_new")
19 >>> print(control._control.attrs.get('dir'))19 >>> print(control._control.attrs.get('dir'))
20 ltr20 ltr
@@ -25,8 +25,8 @@ the separator in language codes rather than an underscore.
25When entering Hebrew translations, the form controls are set to right to left:25When entering Hebrew translations, the form controls are set to right to left:
2626
27 >>> browser.open(27 >>> browser.open(
28 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'28 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
29 ... '+pots/evolution-2.2/he/+translate')29 ... 'evolution/+pots/evolution-2.2/he/+translate')
30 >>> control = browser.getControl(name="msgset_130_he_translation_0_new")30 >>> control = browser.getControl(name="msgset_130_he_translation_0_new")
31 >>> print(control._control.attrs.get('dir'))31 >>> print(control._control.attrs.get('dir'))
32 rtl32 rtl
@@ -37,8 +37,9 @@ When entering Hebrew translations, the form controls are set to right to left:
37If we post the form with suggestions, the form controls are still set to rtl:37If we post the form with suggestions, the form controls are still set to rtl:
3838
39 >>> browser.open(39 >>> browser.open(
40 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'40 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
41 ... '+pots/evolution-2.2/he/+translate?field.alternative_language=es')41 ... 'evolution/+pots/evolution-2.2/he/+translate'
42 ... '?field.alternative_language=es')
42 >>> control = browser.getControl(name="msgset_130_he_translation_0_new")43 >>> control = browser.getControl(name="msgset_130_he_translation_0_new")
43 >>> print(control._control.attrs.get('dir'))44 >>> print(control._control.attrs.get('dir'))
44 rtl45 rtl
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt
index 2e8cbf0..7c3644d 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt
@@ -19,7 +19,7 @@ from the upstream project.
19 >>> logout()19 >>> logout()
2020
21 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')21 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
22 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/3/+translate')22 >>> browser.open('http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/3/+translate')
23 >>> print(extract_text(find_tag_by_id(23 >>> print(extract_text(find_tag_by_id(
24 ... browser.contents, 'msgset_132_es_suggestion_3_0')))24 ... browser.contents, 'msgset_132_es_suggestion_3_0')))
25 tiene25 tiene
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt
index e2de6c3..e909218 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt
@@ -45,7 +45,7 @@ No Privileges Person visits the evolution-2.2 package in Ubuntu Hoary to
45review the state of the translation.45review the state of the translation.
4646
47 >>> user_browser.open(47 >>> user_browser.open(
48 ... 'http://translations.launchpad.test/ubuntu/hoary/'48 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
49 ... '+source/evolution/+pots/evolution-2.2/es/+translate')49 ... '+source/evolution/+pots/evolution-2.2/es/+translate')
50 >>> print(user_browser.title)50 >>> print(user_browser.title)
51 Spanish (es) : Template ...evolution-2.2... :51 Spanish (es) : Template ...evolution-2.2... :
@@ -120,7 +120,7 @@ decides to use the 'Untranslated' filter to locate messages that need
120translations into Australian English.120translations into Australian English.
121121
122 >>> user_browser.open(122 >>> user_browser.open(
123 ... 'http://translations.launchpad.test/ubuntu/hoary/'123 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
124 ... '+source/evolution/+pots/evolution-2.2/en_AU/+translate')124 ... '+source/evolution/+pots/evolution-2.2/en_AU/+translate')
125 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']125 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']
126 >>> user_browser.getControl('Change').click()126 >>> user_browser.getControl('Change').click()
@@ -229,7 +229,7 @@ No Privileges Person can see entries which have changed in Ubuntu.
229There is only one message in the batch.229There is only one message in the batch.
230230
231 >>> user_browser.open(231 >>> user_browser.open(
232 ... 'http://translations.launchpad.test/ubuntu/hoary/'232 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
233 ... '+source/evolution/+pots/evolution-2.2/es/+translate')233 ... '+source/evolution/+pots/evolution-2.2/es/+translate')
234 >>> user_browser.getControl(name='show', index=1).displayValue = [234 >>> user_browser.getControl(name='show', index=1).displayValue = [
235 ... 'changed in Ubuntu']235 ... 'changed in Ubuntu']
@@ -270,7 +270,7 @@ submitted after they were last reviewed. There is only one message in
270the batch.270the batch.
271271
272 >>> user_browser.open(272 >>> user_browser.open(
273 ... 'http://translations.launchpad.test/ubuntu/hoary/'273 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
274 ... '+source/evolution/+pots/evolution-2.2/es/+translate')274 ... '+source/evolution/+pots/evolution-2.2/es/+translate')
275 >>> user_browser.getControl(name='show', index=1).displayValue = [275 >>> user_browser.getControl(name='show', index=1).displayValue = [
276 ... 'with new suggestions']276 ... 'with new suggestions']
@@ -310,7 +310,7 @@ There was once a filter option called need_review. It no longer exists,
310but is quietly accepted.310but is quietly accepted.
311311
312 >>> user_browser.open(312 >>> user_browser.open(
313 ... 'http://translations.launchpad.test/ubuntu/hoary/'313 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
314 ... '+source/evolution/+pots/evolution-2.2/es/+translate'314 ... '+source/evolution/+pots/evolution-2.2/es/+translate'
315 ... '?show=need_review')315 ... '?show=need_review')
316316
@@ -329,7 +329,7 @@ the batch header when they switch the filter to show 'untranslated'
329message; they are seeing the first batch.329message; they are seeing the first batch.
330330
331 >>> user_browser.open(331 >>> user_browser.open(
332 ... 'http://translations.launchpad.test/ubuntu/hoary/'332 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
333 ... '+source/evolution/+pots/evolution-2.2/es/+translate')333 ... '+source/evolution/+pots/evolution-2.2/es/+translate')
334 >>> user_browser.getLink('Last').click()334 >>> user_browser.getLink('Last').click()
335 >>> contents = find_main_content(user_browser.contents)335 >>> contents = find_main_content(user_browser.contents)
@@ -407,7 +407,7 @@ message filters with alternative suggestion languages. No Privileges
407Person submits Chinese translations using Spanish suggestions.407Person submits Chinese translations using Spanish suggestions.
408408
409 >>> user_browser.open(409 >>> user_browser.open(
410 ... 'http://translations.launchpad.test/ubuntu/hoary/'410 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
411 ... '+source/evolution/+pots/evolution-2.2/zh_CN/+translate')411 ... '+source/evolution/+pots/evolution-2.2/zh_CN/+translate')
412 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']412 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']
413 >>> user_browser.getControl('Change').click()413 >>> user_browser.getControl('Change').click()
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt
index 17152d7..7e78530 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt
@@ -24,7 +24,7 @@ If the same user tries translating for another, unrestricted project,
24they get to see the checkbox:24they get to see the checkbox:
2525
26 >>> user_browser.open(26 >>> user_browser.open(
27 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'27 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
28 ... 'evolution/+pots/evolution-2.2/es/1/+translate')28 ... 'evolution/+pots/evolution-2.2/es/1/+translate')
29 >>> needs_review_set = user_browser.getControl(29 >>> needs_review_set = user_browser.getControl(
30 ... 'Someone should review this translation')30 ... 'Someone should review this translation')
@@ -42,7 +42,7 @@ a translator needs to mark the needs review checkbox.
42 ... name='msgset_130_es_translation_0_new').value = "New suggestion"42 ... name='msgset_130_es_translation_0_new').value = "New suggestion"
43 >>> user_browser.getControl('Save & Continue').click()43 >>> user_browser.getControl('Save & Continue').click()
44 >>> print(user_browser.url)44 >>> print(user_browser.url)
45 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/2/+translate45 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/2/+translate
4646
47The needs review flag is unset when we go back to the previous message.47The needs review flag is unset when we go back to the previous message.
4848
@@ -73,7 +73,7 @@ A new translation is entered and checked that it was saved as the current
73translation, while no suggestions are displayed.73translation, while no suggestions are displayed.
7474
75 >>> admin_browser.open(75 >>> admin_browser.open(
76 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'76 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
77 ... 'evolution/+pots/man/es/1/+translate')77 ... 'evolution/+pots/man/es/1/+translate')
78 >>> inputradio = admin_browser.getControl(78 >>> inputradio = admin_browser.getControl(
79 ... name='msgset_166_es_translation_0_radiobutton')79 ... name='msgset_166_es_translation_0_radiobutton')
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt
index d0f8190..55a1516 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt
@@ -16,7 +16,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=299009
1616
17 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')17 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
18 >>> browser.open(18 >>> browser.open(
19 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'19 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
20 ... 'evolution/+pots/evolution-2.2/es/+translate?start=19&batch=1')20 ... 'evolution/+pots/evolution-2.2/es/+translate?start=19&batch=1')
2121
22We can see that the message we are interested in is not translated.22We can see that the message we are interested in is not translated.
@@ -41,7 +41,7 @@ answer should have exactly those strings.
41 ... name='msgset_149_es_translation_0_new').value = '\r\nfoo\r\n\r\n'41 ... name='msgset_149_es_translation_0_new').value = '\r\nfoo\r\n\r\n'
42 >>> browser.getControl(name='submit_translations').click()42 >>> browser.getControl(name='submit_translations').click()
43 >>> print(browser.url)43 >>> print(browser.url)
44 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=19&batch=144 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=19&batch=1
45 >>> print(find_tag_by_id(45 >>> print(find_tag_by_id(
46 ... browser.contents, 'msgset_149_es_translation_0_new'))46 ... browser.contents, 'msgset_149_es_translation_0_new'))
47 <textarea ... name="msgset_149_es_translation_0_new"...>47 <textarea ... name="msgset_149_es_translation_0_new"...>
@@ -60,7 +60,7 @@ change the test, to be 100% sure that the textarea content is the right one.
60 >>> browser.getControl(name='msgset_149_es_translation_0_new').value = 'foo'60 >>> browser.getControl(name='msgset_149_es_translation_0_new').value = 'foo'
61 >>> browser.getControl(name='submit_translations').click()61 >>> browser.getControl(name='submit_translations').click()
62 >>> print(browser.url)62 >>> print(browser.url)
63 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=19&batch=163 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=19&batch=1
64 >>> print(find_tag_by_id(64 >>> print(find_tag_by_id(
65 ... browser.contents,65 ... browser.contents,
66 ... 'msgset_149_es_translation_0_new')) #doctest: -NORMALIZE_WHITESPACE66 ... 'msgset_149_es_translation_0_new')) #doctest: -NORMALIZE_WHITESPACE
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt
index b4a1ada..5ec8ef3 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt
@@ -16,10 +16,10 @@ number of queries issued is relatively low. Mileage may vary, but consider
16this test a tripwire for the number potentially getting out of hand.16this test a tripwire for the number potentially getting out of hand.
1717
18 >>> anon_browser.open(18 >>> anon_browser.open(
19 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'19 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
20 ... '+pots/evolution-2.2/es/+translate')20 ... 'evolution/+pots/evolution-2.2/es/+translate')
21 >>> anon_browser.url21 >>> anon_browser.url
22 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate'22 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate'
23 >>> print(anon_browser.contents)23 >>> print(anon_browser.contents)
24 <...24 <...
25 >>> statement_count = query_counter.count25 >>> statement_count = query_counter.count
@@ -33,10 +33,10 @@ option to make suggestions, but existing suggestions as well. It takes more
33queries, but it still shouldn't run in the hundreds.33queries, but it still shouldn't run in the hundreds.
3434
35 >>> admin_browser.open(35 >>> admin_browser.open(
36 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'36 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
37 ... '+pots/evolution-2.2/es/+translate')37 ... 'evolution/+pots/evolution-2.2/es/+translate')
38 >>> admin_browser.url38 >>> admin_browser.url
39 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate'39 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate'
4040
41XXX: JeroenVermeulen 2008-06-20 bug=241394: This has just started41XXX: JeroenVermeulen 2008-06-20 bug=241394: This has just started
42failing in PQM. May be something to do with the introduction of Storm.42failing in PQM. May be something to do with the introduction of Storm.
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt
index 0994bed..f6c9f40 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt
@@ -8,7 +8,7 @@ No Privileges Person visits the evolution-2.2 package in Ubuntu Hoary
8can see the search box on the translate page:8can see the search box on the translate page:
99
10 >>> user_browser.open(10 >>> user_browser.open(
11 ... 'http://translations.launchpad.test/ubuntu/hoary/'11 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
12 ... '+source/evolution/+pots/evolution-2.2/es/+translate')12 ... '+source/evolution/+pots/evolution-2.2/es/+translate')
13 >>> user_browser.getControl('Search', index=0).value = "contact"13 >>> user_browser.getControl('Search', index=0).value = "contact"
14 >>> user_browser.getForm(id="search_form").submit()14 >>> user_browser.getForm(id="search_form").submit()
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate.txt
index ccb3921..e90e6f3 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate.txt
@@ -31,7 +31,7 @@ Anonymous users are able to browse translations, but not to change them
31through the translation form.31through the translation form.
3232
33 >>> browser.open(33 >>> browser.open(
34 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'34 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
35 ... 'evolution/+pots/evolution-2.2/es/+translate')35 ... 'evolution/+pots/evolution-2.2/es/+translate')
3636
37The page is rendered in read-only mode, without any textareas for input.37The page is rendered in read-only mode, without any textareas for input.
@@ -75,7 +75,7 @@ Translation Admin Access
75Let's log in.75Let's log in.
7676
77 >>> admin_browser.open(77 >>> admin_browser.open(
78 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'78 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
79 ... 'evolution/+pots/evolution-2.2/es/+translate')79 ... 'evolution/+pots/evolution-2.2/es/+translate')
8080
81As a translation admin you will have access to the download, upload81As a translation admin you will have access to the download, upload
@@ -113,7 +113,7 @@ links from off-site; Launchpad did make links for English translations
113in the past.113in the past.
114114
115 >>> browser.open(115 >>> browser.open(
116 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'116 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
117 ... 'evolution/+pots/evolution-2.2/en/+translate')117 ... 'evolution/+pots/evolution-2.2/en/+translate')
118 Traceback (most recent call last):118 Traceback (most recent call last):
119 ...119 ...
@@ -144,8 +144,9 @@ they must adhere religiously to an agreed-to format.
144144
145 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')145 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
146 >>> browser.open("http://translations.launchpad.test/"146 >>> browser.open("http://translations.launchpad.test/"
147 ... "ubuntu/hoary/+source/evolution/+pots/evolution-2.2"147 ... "ubuntu/+series/hoary/+source/evolution/+pots"
148 ... "/en_AU/+translate?field.alternative_language=es")148 ... "/evolution-2.2/en_AU/+translate"
149 ... "?field.alternative_language=es")
149150
150Elements related 1:1 to a translatable message on this form have names and151Elements related 1:1 to a translatable message on this form have names and
151identifiers constructed as "msgset_<id>," where <id> is the unpadded decimal152identifiers constructed as "msgset_<id>," where <id> is the unpadded decimal
@@ -210,7 +211,7 @@ There are many variants of this id structure, generated in several places and
210for several objects, all generated by the same methods.211for several objects, all generated by the same methods.
211212
212 >>> browser.open(213 >>> browser.open(
213 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'214 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
214 ... 'evolution/+pots/evolution-2.2/es/5/+translate')215 ... 'evolution/+pots/evolution-2.2/es/5/+translate')
215 >>> print(extract_text(find_tag_by_id(216 >>> print(extract_text(find_tag_by_id(
216 ... browser.contents, 'msgset_134_es_suggestion_694_0')))217 ... browser.contents, 'msgset_134_es_suggestion_694_0')))
@@ -227,12 +228,12 @@ the plural form informations.
227This notice is display when doing batch translations or translating a228This notice is display when doing batch translations or translating a
228single message.229single message.
229230
230 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/'231 >>> browser.open('http://translations.launchpad.test/ubuntu/+series/hoary/'
231 ... '+source/evolution/+pots/evolution-2.2/ab/+translate')232 ... '+source/evolution/+pots/evolution-2.2/ab/+translate')
232 >>> print_feedback_messages(browser.contents)233 >>> print_feedback_messages(browser.contents)
233 Launchpad canā€™t handle the plural items ...234 Launchpad canā€™t handle the plural items ...
234235
235 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/'236 >>> browser.open('http://translations.launchpad.test/ubuntu/+series/hoary/'
236 ... '+source/evolution/+pots/evolution-2.2/ab/5/+translate')237 ... '+source/evolution/+pots/evolution-2.2/ab/5/+translate')
237 >>> print_feedback_messages(browser.contents)238 >>> print_feedback_messages(browser.contents)
238 Launchpad canā€™t handle the plural items ...239 Launchpad canā€™t handle the plural items ...
diff --git a/lib/lp/translations/stories/standalone/xx-potemplate-admin.txt b/lib/lp/translations/stories/standalone/xx-potemplate-admin.txt
index bf9852a..05256c9 100644
--- a/lib/lp/translations/stories/standalone/xx-potemplate-admin.txt
+++ b/lib/lp/translations/stories/standalone/xx-potemplate-admin.txt
@@ -208,7 +208,7 @@ autonomously.
208 >>> translation_group = factory.makeTranslationGroup(group_owner)208 >>> translation_group = factory.makeTranslationGroup(group_owner)
209 >>> ubuntu.translationgroup = translation_group209 >>> ubuntu.translationgroup = translation_group
210 >>> template_admin_url = str(210 >>> template_admin_url = str(
211 ... 'http://translations.launchpad.test/ubuntu/hoary/'211 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
212 ... '+source/%s/+pots/%s/+admin' % (212 ... '+source/%s/+pots/%s/+admin' % (
213 ... dsp.sourcepackagename.name, template.name))213 ... dsp.sourcepackagename.name, template.name))
214 >>> logout()214 >>> logout()
diff --git a/lib/lp/translations/stories/standalone/xx-potemplate-export.txt b/lib/lp/translations/stories/standalone/xx-potemplate-export.txt
index 9f42e51..5bfcd5e 100644
--- a/lib/lp/translations/stories/standalone/xx-potemplate-export.txt
+++ b/lib/lp/translations/stories/standalone/xx-potemplate-export.txt
@@ -4,7 +4,7 @@ Exporting Files from PO Templates Through the Web
4Not logged in users can't access the +export page.4Not logged in users can't access the +export page.
55
6 >>> anon_browser.open(6 >>> anon_browser.open(
7 ... 'http://translations.launchpad.test/ubuntu/hoary'7 ... 'http://translations.launchpad.test/ubuntu/+series/hoary'
8 ... '/+source/evolution/+pots/evolution-2.2/')8 ... '/+source/evolution/+pots/evolution-2.2/')
9 >>> anon_browser.getLink('download').click()9 >>> anon_browser.getLink('download').click()
10 Traceback (most recent call last):10 Traceback (most recent call last):
@@ -15,7 +15,7 @@ Logged in as a regular user, the +export page is accessible.
1515
16 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')16 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
17 >>> browser.open(17 >>> browser.open(
18 ... 'http://translations.launchpad.test/ubuntu/hoary'18 ... 'http://translations.launchpad.test/ubuntu/+series/hoary'
19 ... '/+source/evolution/+pots/evolution-2.2')19 ... '/+source/evolution/+pots/evolution-2.2')
20 >>> browser.getLink('download').click()20 >>> browser.getLink('download').click()
21 >>> browser.title21 >>> browser.title
@@ -48,7 +48,7 @@ added to the export queue and individual requests are added for the PO files.
48 >>> browser.getControl('Format:').value = ['PO']48 >>> browser.getControl('Format:').value = ['PO']
49 >>> browser.getControl('Request Download').click()49 >>> browser.getControl('Request Download').click()
50 >>> print(browser.url)50 >>> print(browser.url)
51 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.251 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2
5252
53 >>> print_feedback_messages(browser.contents)53 >>> print_feedback_messages(browser.contents)
54 Your request has been received. Expect to receive an email shortly.54 Your request has been received. Expect to receive an email shortly.
@@ -63,7 +63,7 @@ This is a no-op: (See bug https://launchpad.net/rosetta/+bug/1558)
63 >>> browser.getControl('Format:').value = ['PO']63 >>> browser.getControl('Format:').value = ['PO']
64 >>> browser.getControl('Request Download').click()64 >>> browser.getControl('Request Download').click()
65 >>> print(browser.url)65 >>> print(browser.url)
66 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.266 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2
6767
68 >>> print_feedback_messages(browser.contents)68 >>> print_feedback_messages(browser.contents)
69 Your request has been received. Expect to receive an email shortly.69 Your request has been received. Expect to receive an email shortly.
diff --git a/lib/lp/translations/stories/standalone/xx-potemplate-index.txt b/lib/lp/translations/stories/standalone/xx-potemplate-index.txt
index 8bf48de..614d0ef 100644
--- a/lib/lp/translations/stories/standalone/xx-potemplate-index.txt
+++ b/lib/lp/translations/stories/standalone/xx-potemplate-index.txt
@@ -15,7 +15,7 @@ for a source package. No Privileges Person visits the
15evolution-2.2 POTemplate page.15evolution-2.2 POTemplate page.
1616
17 >>> anon_browser.open("http://translations.launchpad.test/"17 >>> anon_browser.open("http://translations.launchpad.test/"
18 ... "ubuntu/hoary/+source/evolution/+pots/evolution-2.2/")18 ... "ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/")
19 >>> print(anon_browser.title)19 >>> print(anon_browser.title)
20 Template ...evolution-2.2... : Hoary (5.04) :20 Template ...evolution-2.2... : Hoary (5.04) :
21 Translations : evolution package : Ubuntu21 Translations : evolution package : Ubuntu
@@ -55,7 +55,8 @@ languages when the user speaks English or even when English
55translations exist. The Mozilla sourcepackage pkgconf-mozilla has55translations exist. The Mozilla sourcepackage pkgconf-mozilla has
56English translations, but they are not displayed to the user.56English translations, but they are not displayed to the user.
5757
58 >>> anon_browser.open('http://translations.launchpad.test/ubuntu/hoary/'58 >>> anon_browser.open(
59 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
59 ... '+source/mozilla/+pots/pkgconf-mozilla')60 ... '+source/mozilla/+pots/pkgconf-mozilla')
60 >>> table = find_tag_by_id(anon_browser.contents, 'language-chart')61 >>> table = find_tag_by_id(anon_browser.contents, 'language-chart')
61 >>> for row in table.findAll('tr')[0:6]:62 >>> for row in table.findAll('tr')[0:6]:
@@ -84,7 +85,7 @@ the Ubuntu source package. This information is displayed on the page.
84 evolution in Ubuntu Hoary template evolution-2.2.85 evolution in Ubuntu Hoary template evolution-2.2.
85 View sharing details86 View sharing details
86 >>> print(sharing_info)87 >>> print(sharing_info)
87 <div...<a href="/ubuntu/hoary/+source/evolution/+pots/evolution-2.2"...88 <div...<a href="/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2"...
8889
89Likewise, the Ubuntu template gives information about how it is sharing90Likewise, the Ubuntu template gives information about how it is sharing
90translations with the upstream project.91translations with the upstream project.
@@ -111,7 +112,7 @@ information.
111 >>> print(extract_text(sharing_details))112 >>> print(extract_text(sharing_details))
112 Edit sharing details113 Edit sharing details
113 >>> print(sharing_details['href'])114 >>> print(sharing_details['href'])
114 http://.../ubuntu/hoary/+source/evolution/+sharing-details115 http://.../ubuntu/+series/hoary/+source/evolution/+sharing-details
115116
116117
117118
@@ -171,7 +172,7 @@ templates.
171172
172 >>> browser.open(173 >>> browser.open(
173 ... ("http://translations.launchpad.test/"174 ... ("http://translations.launchpad.test/"
174 ... "ubuntu/hoary/+source/%s/+pots/%s") % (175 ... "ubuntu/+series/hoary/+source/%s/+pots/%s") % (
175 ... package.name, template.name))176 ... package.name, template.name))
176 >>> relatives = find_tag_by_id(177 >>> relatives = find_tag_by_id(
177 ... browser.contents, 'potemplate-relatives')178 ... browser.contents, 'potemplate-relatives')
@@ -191,7 +192,7 @@ Another template is added to the same source package.
191192
192 >>> browser.open(193 >>> browser.open(
193 ... ("http://translations.launchpad.test/"194 ... ("http://translations.launchpad.test/"
194 ... "ubuntu/hoary/+source/%s/+pots/%s") % (195 ... "ubuntu/+series/hoary/+source/%s/+pots/%s") % (
195 ... package.name, template.name))196 ... package.name, template.name))
196 >>> relatives = find_tag_by_id(197 >>> relatives = find_tag_by_id(
197 ... browser.contents, 'potemplate-relatives')198 ... browser.contents, 'potemplate-relatives')
@@ -215,7 +216,7 @@ Another template is added to the same source package.
215216
216 >>> browser.open((217 >>> browser.open((
217 ... "http://translations.launchpad.test/"218 ... "http://translations.launchpad.test/"
218 ... "ubuntu/hoary/+source/%s/+pots/%s") % (219 ... "ubuntu/+series/hoary/+source/%s/+pots/%s") % (
219 ... package.name, template.name))220 ... package.name, template.name))
220 >>> relatives = find_tag_by_id(221 >>> relatives = find_tag_by_id(
221 ... browser.contents, 'potemplate-relatives')222 ... browser.contents, 'potemplate-relatives')
@@ -226,7 +227,7 @@ Another template is added to the same source package.
226 >>> browser.getLink('2 other templates').click()227 >>> browser.getLink('2 other templates').click()
227 >>> browser.url == ((228 >>> browser.url == ((
228 ... 'http://translations.launchpad.test/'229 ... 'http://translations.launchpad.test/'
229 ... 'ubuntu/hoary/+source/%s/+translations') % (230 ... 'ubuntu/+series/hoary/+source/%s/+translations') % (
230 ... package.name))231 ... package.name))
231 True232 True
232233
@@ -280,7 +281,7 @@ administration or download/upload links.
280281
281 >>> anon_browser.open(282 >>> anon_browser.open(
282 ... 'http://translations.launchpad.test/'283 ... 'http://translations.launchpad.test/'
283 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')284 ... 'ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2')
284 >>> anon_browser.getLink('upload')285 >>> anon_browser.getLink('upload')
285 Traceback (most recent call last):286 Traceback (most recent call last):
286 ...287 ...
@@ -296,7 +297,7 @@ but not the one for uploading file to this potemplate.
296297
297 >>> user_browser.open(298 >>> user_browser.open(
298 ... 'http://translations.launchpad.test/'299 ... 'http://translations.launchpad.test/'
299 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')300 ... 'ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2')
300 >>> user_browser.getLink('upload')301 >>> user_browser.getLink('upload')
301 Traceback (most recent call last):302 Traceback (most recent call last):
302 ...303 ...
@@ -304,7 +305,7 @@ but not the one for uploading file to this potemplate.
304305
305 >>> user_browser.getLink('download').click()306 >>> user_browser.getLink('download').click()
306 >>> print(user_browser.url)307 >>> print(user_browser.url)
307 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+export308 http://trans.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/+export
308309
309Translation administrators will see both download and upload links.310Translation administrators will see both download and upload links.
310Beside administering this template, "Change permissions"311Beside administering this template, "Change permissions"
@@ -312,28 +313,28 @@ and "Change details" should be also accessible.
312313
313 >>> admin_browser.open(314 >>> admin_browser.open(
314 ... 'http://translations.launchpad.test/'315 ... 'http://translations.launchpad.test/'
315 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')316 ... 'ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2')
316 >>> admin_browser.getLink('upload').click()317 >>> admin_browser.getLink('upload').click()
317 >>> print(admin_browser.url)318 >>> print(admin_browser.url)
318 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+upload319 http://trans.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/+upload
319320
320 >>> admin_browser.open(321 >>> admin_browser.open(
321 ... 'http://translations.launchpad.test/'322 ... 'http://translations.launchpad.test/'
322 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')323 ... 'ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2')
323 >>> admin_browser.getLink('download').click()324 >>> admin_browser.getLink('download').click()
324 >>> print(admin_browser.url)325 >>> print(admin_browser.url)
325 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+export326 http://trans.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/+export
326327
327 >>> admin_browser.open(328 >>> admin_browser.open(
328 ... 'http://translations.launchpad.test/'329 ... 'http://translations.launchpad.test/'
329 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')330 ... 'ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2')
330 >>> admin_browser.getLink('Administer this template').click()331 >>> admin_browser.getLink('Administer this template').click()
331 >>> print(admin_browser.url)332 >>> print(admin_browser.url)
332 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+admin333 http://trans.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/+admin
333334
334 >>> admin_browser.open(335 >>> admin_browser.open(
335 ... 'http://translations.launchpad.test/'336 ... 'http://translations.launchpad.test/'
336 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')337 ... 'ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2')
337 >>> admin_browser.getLink('Change details').click()338 >>> admin_browser.getLink('Change details').click()
338 >>> print(admin_browser.url)339 >>> print(admin_browser.url)
339 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+edit340 http://trans.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/+edit
diff --git a/lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt b/lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt
index 949cc61..ddd263e 100644
--- a/lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt
+++ b/lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt
@@ -1,7 +1,7 @@
1Checks that the '+pots/' page redirects always to the '+translations' one.1Checks that the '+pots/' page redirects always to the '+translations' one.
22
3 >>> print(http(r"""3 >>> print(http(r"""
4 ... GET /ubuntu/hoary/+source/evolution/+pots/ HTTP/1.14 ... GET /ubuntu/+series/hoary/+source/evolution/+pots/ HTTP/1.1
5 ... Accept-Language: en-gb,en;q=0.55 ... Accept-Language: en-gb,en;q=0.5
6 ... Host: translations.launchpad.test6 ... Host: translations.launchpad.test
7 ... """))7 ... """))
@@ -15,13 +15,13 @@ Checks that the '+pots/' page redirects always to the '+translations' one.
15Checks that the '+pots' page redirects always to the '+translations' one.15Checks that the '+pots' page redirects always to the '+translations' one.
1616
17 >>> print(http(r"""17 >>> print(http(r"""
18 ... GET /ubuntu/hoary/+source/evolution/+pots HTTP/1.118 ... GET /ubuntu/+series/hoary/+source/evolution/+pots HTTP/1.1
19 ... Accept-Language: en-gb,en;q=0.519 ... Accept-Language: en-gb,en;q=0.5
20 ... Host: translations.launchpad.test20 ... Host: translations.launchpad.test
21 ... """))21 ... """))
22 HTTP/1.1 303 See Other22 HTTP/1.1 303 See Other
23 ...23 ...
24 Location: .../ubuntu/hoary/+source/evolution/+pots...24 Location: .../ubuntu/+series/hoary/+source/evolution/+pots...
25 ...25 ...
2626
27Checks that the '+sources/.../+translate' page redirects always to the27Checks that the '+sources/.../+translate' page redirects always to the
@@ -32,7 +32,7 @@ Hardy, which is 2013-04. Please consult with the Ubuntu Desktop team before
32removing.32removing.
3333
34 >>> print(http(r"""34 >>> print(http(r"""
35 ... GET /ubuntu/hoary/+sources/evolution/+translate HTTP/1.135 ... GET /ubuntu/+series/hoary/+sources/evolution/+translate HTTP/1.1
36 ... Accept-Language: en-gb,en;q=0.536 ... Accept-Language: en-gb,en;q=0.5
37 ... Host: translations.launchpad.test37 ... Host: translations.launchpad.test
38 ... """))38 ... """))
diff --git a/lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt b/lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt
index e4f442c..31eabd4 100644
--- a/lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt
+++ b/lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt
@@ -10,7 +10,7 @@ IP address, since we'll use that later.
10 >>> anon_browser.addHeader('X_FORWARDED_FOR', '196.36.161.227')10 >>> anon_browser.addHeader('X_FORWARDED_FOR', '196.36.161.227')
1111
12 >>> anon_browser.open(12 >>> anon_browser.open(
13 ... 'http://translations.launchpad.test/ubuntu/hoary/'13 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
14 ... '+source/evolution')14 ... '+source/evolution')
15 >>> anon_browser.title15 >>> anon_browser.title
16 'Hoary (5.04) : Translations : ...evolution...package : Ubuntu'16 'Hoary (5.04) : Translations : ...evolution...package : Ubuntu'
diff --git a/lib/lp/translations/stories/standalone/xx-series-templates.txt b/lib/lp/translations/stories/standalone/xx-series-templates.txt
index 882ecff..04b461a 100644
--- a/lib/lp/translations/stories/standalone/xx-series-templates.txt
+++ b/lib/lp/translations/stories/standalone/xx-series-templates.txt
@@ -17,10 +17,10 @@ To get to the listing of all templates, one needs to use the link
17from the distribution series translations page.17from the distribution series translations page.
1818
19 >>> user_browser.open(19 >>> user_browser.open(
20 ... 'http://translations.launchpad.test/ubuntu/hoary')20 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
21 >>> user_browser.getLink('full list of templates').click()21 >>> user_browser.getLink('full list of templates').click()
22 >>> print(user_browser.url)22 >>> print(user_browser.url)
23 http://translations.launchpad.test/ubuntu/hoary/+templates23 http://translations.launchpad.test/ubuntu/+series/hoary/+templates
2424
2525
26Templates view for DistroSeries26Templates view for DistroSeries
@@ -30,7 +30,7 @@ Full template listing for a distribution series is reached by following
30a link from the distribution series translations page.30a link from the distribution series translations page.
3131
32 >>> anon_browser.open(32 >>> anon_browser.open(
33 ... 'http://translations.launchpad.test/ubuntu/hoary')33 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
34 >>> anon_browser.getLink('full list of templates').click()34 >>> anon_browser.getLink('full list of templates').click()
3535
36Full listing of templates shows priority, source package name, template name36Full listing of templates shows priority, source package name, template name
@@ -46,7 +46,7 @@ length, languages and the date of last update for this distribution series.
46Logged-in users see a link to all the active translation templates46Logged-in users see a link to all the active translation templates
47on a distribution series translation page.47on a distribution series translation page.
48 >>> user_browser.open(48 >>> user_browser.open(
49 ... 'http://translations.launchpad.test/ubuntu/hoary')49 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
50 >>> user_browser.getLink('full list of templates').click()50 >>> user_browser.getLink('full list of templates').click()
5151
52Regular users only see the option to download translations for each of52Regular users only see the option to download translations for each of
@@ -61,7 +61,7 @@ the active templates.
61Administrator can see all editing options.61Administrator can see all editing options.
6262
63 >>> admin_browser.open(63 >>> admin_browser.open(
64 ... 'http://translations.launchpad.test/ubuntu/hoary')64 ... 'http://translations.launchpad.test/ubuntu/+series/hoary')
65 >>> admin_browser.getLink('full list of templates').click()65 >>> admin_browser.getLink('full list of templates').click()
6666
67The page shows a table of all templates and links to their subpages.67The page shows a table of all templates and links to their subpages.
@@ -84,16 +84,18 @@ appropriate page.
8484
85 >>> utc_browser = setupDTCBrowser()85 >>> utc_browser = setupDTCBrowser()
86 >>> utc_browser.open(86 >>> utc_browser.open(
87 ... 'http://translations.launchpad.test/ubuntu/hoary/+templates')87 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
88 ... '+templates')
88 >>> utc_browser.getLink(89 >>> utc_browser.getLink(
89 ... url='+source/evolution/+pots/evolution-2.2/+edit').click()90 ... url='+source/evolution/+pots/evolution-2.2/+edit').click()
90 >>> print(utc_browser.url)91 >>> print(utc_browser.url)
91 http://.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+edit92 http://.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/+edit
9293
93Administration page is inaccessible.94Administration page is inaccessible.
9495
95 >>> utc_browser.open(96 >>> utc_browser.open(
96 ... 'http://translations.launchpad.test/ubuntu/hoary/+templates')97 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
98 ... '+templates')
97 >>> utc_browser.getLink(99 >>> utc_browser.getLink(
98 ... url='+source/evolution/+pots/evolution-2.2/+admin')100 ... url='+source/evolution/+pots/evolution-2.2/+admin')
99 Traceback (most recent call last):101 Traceback (most recent call last):
@@ -103,16 +105,18 @@ Administration page is inaccessible.
103Trying to edit disabled templates brings them to the appropriate page.105Trying to edit disabled templates brings them to the appropriate page.
104106
105 >>> utc_browser.open(107 >>> utc_browser.open(
106 ... 'http://translations.launchpad.test/ubuntu/hoary/+templates')108 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
109 ... '+templates')
107 >>> utc_browser.getLink(110 >>> utc_browser.getLink(
108 ... url='+source/evolution/+pots/disabled-template/+edit').click()111 ... url='+source/evolution/+pots/disabled-template/+edit').click()
109 >>> print(utc_browser.url)112 >>> print(utc_browser.url)
110 http://.../ubuntu/hoary/+source/evolution/+pots/disabled-template/+edit113 http://.../ubuntu/+series/hoary/+source/evolution/+pots/disabled-template/+edit
111114
112Administration page is inaccessible.115Administration page is inaccessible.
113116
114 >>> utc_browser.open(117 >>> utc_browser.open(
115 ... 'http://translations.launchpad.test/ubuntu/hoary/+templates')118 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
119 ... '+templates')
116 >>> utc_browser.getLink(120 >>> utc_browser.getLink(
117 ... url='+source/evolution/+pots/disabled-template/+admin')121 ... url='+source/evolution/+pots/disabled-template/+admin')
118 Traceback (most recent call last):122 Traceback (most recent call last):
@@ -128,13 +132,14 @@ page.
128132
129 >>> admin_browser.getLink('pmount').click()133 >>> admin_browser.getLink('pmount').click()
130 >>> print(admin_browser.url)134 >>> print(admin_browser.url)
131 http://translations.launchpad.test/ubuntu/hoary/+source/pmount/+pots/pmount135 http://translations.launchpad.test/ubuntu/+series/hoary/+source/pmount/+pots/pmount
132136
133Clicking on 'Edit' will take the user to the page to edit the template137Clicking on 'Edit' will take the user to the page to edit the template
134details. Likewise for the other links for each template.138details. Likewise for the other links for each template.
135139
136 >>> admin_browser.open(140 >>> admin_browser.open(
137 ... 'http://translations.launchpad.test/ubuntu/hoary/+templates')141 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
142 ... '+templates')
138 >>> admin_browser.getLink('Edit', index=1).click()143 >>> admin_browser.getLink('Edit', index=1).click()
139 >>> print(admin_browser.url)144 >>> print(admin_browser.url)
140 http://translations.../evolution/+pots/disabled-template/+edit145 http://translations.../evolution/+pots/disabled-template/+edit
diff --git a/lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt b/lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt
index 93b3b67..ab1280f 100644
--- a/lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt
+++ b/lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt
@@ -41,7 +41,7 @@ informed about this fact and will be able to add translations without
41requiring a review.41requiring a review.
4242
43 >>> user_browser.open(43 >>> user_browser.open(
44 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/es')44 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/es')
45 >>> print(extract_text(45 >>> print(extract_text(
46 ... find_tag_by_id(user_browser.contents, 'group-team-info')))46 ... find_tag_by_id(user_browser.contents, 'group-team-info')))
47 There is no translation group to manage Ubuntu translations.47 There is no translation group to manage Ubuntu translations.
@@ -79,10 +79,10 @@ Evolution Spanish templates can be accessed from the distribution series
79translation page.79translation page.
8080
81 >>> user_browser.open(81 >>> user_browser.open(
82 ... 'http://translations.launchpad.test/ubuntu/hoary/')82 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/')
83 >>> user_browser.getLink('Spanish').click()83 >>> user_browser.getLink('Spanish').click()
84 >>> print(user_browser.url)84 >>> print(user_browser.url)
85 http://translations.launchpad.test/ubuntu/hoary/+lang/es85 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/es
8686
87 >>> print(extract_text(87 >>> print(extract_text(
88 ... find_tag_by_id(user_browser.contents, 'group-team-info')))88 ... find_tag_by_id(user_browser.contents, 'group-team-info')))
@@ -108,10 +108,10 @@ there is no one to review the work, authenticated users can not add
108suggestions.108suggestions.
109109
110 >>> user_browser.open(110 >>> user_browser.open(
111 ... 'http://translations.launchpad.test/ubuntu/hoary/')111 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/')
112 >>> user_browser.getLink('Catalan').click()112 >>> user_browser.getLink('Catalan').click()
113 >>> print(user_browser.url)113 >>> print(user_browser.url)
114 http://translations.launchpad.test/ubuntu/hoary/+lang/ca114 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/ca
115115
116 >>> print(extract_text(116 >>> print(extract_text(
117 ... find_tag_by_id(user_browser.contents, 'group-team-info')))117 ... find_tag_by_id(user_browser.contents, 'group-team-info')))
@@ -131,7 +131,7 @@ Members of translation team and translations admins have full access to
131translations. They can add and review translations.131translations. They can add and review translations.
132132
133 >>> admin_browser.open(133 >>> admin_browser.open(
134 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/ro')134 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/ro')
135 >>> print(extract_text(find_tag_by_id(135 >>> print(extract_text(find_tag_by_id(
136 ... admin_browser.contents, 'translation-access-level')))136 ... admin_browser.contents, 'translation-access-level')))
137 You can add and review translations...137 You can add and review translations...
@@ -145,7 +145,7 @@ be allowed to make any changes.
145 >>> logout()145 >>> logout()
146146
147 >>> user_browser.open(147 >>> user_browser.open(
148 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/ro')148 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/ro')
149 >>> print(extract_text(find_tag_by_id(149 >>> print(extract_text(find_tag_by_id(
150 ... user_browser.contents, 'translation-access-level')))150 ... user_browser.contents, 'translation-access-level')))
151 These templates can be translated only by their managers...151 These templates can be translated only by their managers...
@@ -162,7 +162,7 @@ translations, and will see a link to the licence page.
162 >>> no_license_browser = setupBrowser(162 >>> no_license_browser = setupBrowser(
163 ... auth='Basic dude@ex.com:test')163 ... auth='Basic dude@ex.com:test')
164 >>> no_license_browser.open(164 >>> no_license_browser.open(
165 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/ro')165 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/ro')
166 >>> print(extract_text(find_tag_by_id(166 >>> print(extract_text(find_tag_by_id(
167 ... no_license_browser.contents, 'translation-access-level')))167 ... no_license_browser.contents, 'translation-access-level')))
168 To make translations in Launchpad you need to agree with168 To make translations in Launchpad you need to agree with
@@ -179,7 +179,7 @@ this fact. No access level information is displayed.
179 >>> logout()179 >>> logout()
180180
181 >>> user_browser.open(181 >>> user_browser.open(
182 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/ro')182 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/ro')
183 >>> print(extract_text(183 >>> print(extract_text(
184 ... find_tag_by_id(user_browser.contents, 'group-team-info')))184 ... find_tag_by_id(user_browser.contents, 'group-team-info')))
185 There is no translation group to manage Ubuntu translations.185 There is no translation group to manage Ubuntu translations.
diff --git a/lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt b/lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt
index 04994c8..5591ab6 100644
--- a/lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt
+++ b/lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt
@@ -16,12 +16,13 @@ Mark is a qualified user.
1616
17 >>> browser = setupBrowser(auth='Basic mark@example.com:test')17 >>> browser = setupBrowser(auth='Basic mark@example.com:test')
18 >>> browser.open(18 >>> browser.open(
19 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/mozilla/')19 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
20 ... 'mozilla/')
20 >>> download = browser.getLink('download a full tarball')21 >>> download = browser.getLink('download a full tarball')
21 >>> download_url = download.url22 >>> download_url = download.url
22 >>> download.click()23 >>> download.click()
23 >>> print(browser.url)24 >>> print(browser.url)
24 http://translations.launchpad.test/ubuntu/hoary/+source/mozilla/+export25 http://translations.launchpad.test/ubuntu/+series/hoary/+source/mozilla/+export
2526
2627
27Authorization28Authorization
@@ -43,7 +44,7 @@ reasonable level.
43 ... """44 ... """
44 ... browser.open(45 ... browser.open(
45 ... 'http://translations.launchpad.test/'46 ... 'http://translations.launchpad.test/'
46 ... 'ubuntu/hoary/+source/mozilla/')47 ... 'ubuntu/+series/hoary/+source/mozilla/')
47 ... try:48 ... try:
48 ... browser.getLink('download a full tarball').click()49 ... browser.getLink('download a full tarball').click()
49 ... except LinkNotFoundError:50 ... except LinkNotFoundError:
@@ -164,14 +165,14 @@ format, and request the download.
164165
165 >>> browser.open(166 >>> browser.open(
166 ... 'http://translations.launchpad.test/'167 ... 'http://translations.launchpad.test/'
167 ... 'ubuntu/hoary/+source/mozilla/+export')168 ... 'ubuntu/+series/hoary/+source/mozilla/+export')
168 >>> browser.title169 >>> browser.title
169 'Download : Hoary (5.04) : Translations : mozilla package : Ubuntu'170 'Download : Hoary (5.04) : Translations : mozilla package : Ubuntu'
170171
171 >>> browser.getControl('Request Download').click()172 >>> browser.getControl('Request Download').click()
172173
173 >>> print(browser.url)174 >>> print(browser.url)
174 http://translations.launchpad.test/ubuntu/hoary/+source/mozilla175 http://translations.launchpad.test/ubuntu/+series/hoary/+source/mozilla
175176
176 >>> print_feedback_messages(browser.contents)177 >>> print_feedback_messages(browser.contents)
177 Your request has been received. Expect to receive an email shortly.178 Your request has been received. Expect to receive an email shortly.
@@ -202,7 +203,7 @@ there before.
202203
203 >>> browser.open(204 >>> browser.open(
204 ... 'http://translations.launchpad.test/'205 ... 'http://translations.launchpad.test/'
205 ... 'ubuntu/hoary/+source/evolution/+export')206 ... 'ubuntu/+series/hoary/+source/evolution/+export')
206 >>> print_feedback_messages(browser.contents)207 >>> print_feedback_messages(browser.contents)
207208
208 >>> an_evolution_template.source_file_format = TranslationFileFormat.MO209 >>> an_evolution_template.source_file_format = TranslationFileFormat.MO
@@ -210,7 +211,7 @@ there before.
210211
211 >>> browser.open(212 >>> browser.open(
212 ... 'http://translations.launchpad.test/'213 ... 'http://translations.launchpad.test/'
213 ... 'ubuntu/hoary/+source/evolution/+export')214 ... 'ubuntu/+series/hoary/+source/evolution/+export')
214 >>> print_feedback_messages(browser.contents)215 >>> print_feedback_messages(browser.contents)
215 This package has templates with different native file formats. If you216 This package has templates with different native file formats. If you
216 proceed, all translations will be exported in the single format you217 proceed, all translations will be exported in the single format you
diff --git a/lib/lp/translations/stories/standalone/xx-test-potlists.txt b/lib/lp/translations/stories/standalone/xx-test-potlists.txt
index 67ea105..00a338f 100644
--- a/lib/lp/translations/stories/standalone/xx-test-potlists.txt
+++ b/lib/lp/translations/stories/standalone/xx-test-potlists.txt
@@ -1,7 +1,7 @@
1Check that we can get a potlist for a source pacakge that has potemplates:1Check that we can get a potlist for a source pacakge that has potemplates:
22
3 >>> print(http(br"""3 >>> print(http(br"""
4 ... GET /ubuntu/hoary/+source/evolution/+potlist HTTP/1.14 ... GET /ubuntu/+series/hoary/+source/evolution/+potlist HTTP/1.1
5 ... Host: translations.launchpad.test5 ... Host: translations.launchpad.test
6 ... """))6 ... """))
7 HTTP/1.1 200 Ok7 HTTP/1.1 200 Ok
diff --git a/lib/lp/translations/stories/standalone/xx-translation-help.txt b/lib/lp/translations/stories/standalone/xx-translation-help.txt
index 4deb2bf..93aaae4 100644
--- a/lib/lp/translations/stories/standalone/xx-translation-help.txt
+++ b/lib/lp/translations/stories/standalone/xx-translation-help.txt
@@ -16,7 +16,7 @@ pages. Namely, on a Distribution and DistroSeries pages:
16 >>> browser.getLink(id='link-to-translations-help').url16 >>> browser.getLink(id='link-to-translations-help').url
17 'https://help.launchpad.net/Translations'17 'https://help.launchpad.net/Translations'
1818
19 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary')19 >>> browser.open('http://translations.launchpad.test/ubuntu/+series/hoary')
20 >>> browser.getLink(id='link-to-translations-help').url20 >>> browser.getLink(id='link-to-translations-help').url
21 'https://help.launchpad.net/Translations'21 'https://help.launchpad.net/Translations'
2222
diff --git a/lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt b/lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt
index e7fb942..80c11cf 100644
--- a/lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt
+++ b/lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt
@@ -22,7 +22,7 @@ First, we need to be sure that anonymous users are able to browse
22translations but are unable to actually change them.22translations but are unable to actually change them.
2323
24 >>> browser.open(24 >>> browser.open(
25 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'25 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
26 ... 'evolution/+pots/evolution-2.2/es/5')26 ... 'evolution/+pots/evolution-2.2/es/5')
2727
28We are in read only mode, so there shouldn't be any textareas:28We are in read only mode, so there shouldn't be any textareas:
@@ -64,7 +64,7 @@ The main page for a pomsgset object should redirect us to the
64translation form.64translation form.
6565
66 >>> browser.open(66 >>> browser.open(
67 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'67 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
68 ... 'evolution/+pots/evolution-2.2/es/1')68 ... 'evolution/+pots/evolution-2.2/es/1')
6969
70When we are on the first message, we should be 100% sure that the70When we are on the first message, we should be 100% sure that the
@@ -72,7 +72,7 @@ When we are on the first message, we should be 100% sure that the
72right ones.72right ones.
7373
74 >>> browser.open(74 >>> browser.open(
75 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'75 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
76 ... 'evolution/+pots/evolution-2.2/es/1/+translate')76 ... 'evolution/+pots/evolution-2.2/es/1/+translate')
7777
78 >>> browser.getLink('First')78 >>> browser.getLink('First')
@@ -183,7 +183,7 @@ All those links should linked the proper pages
183Now, we are going to check a message submission.183Now, we are going to check a message submission.
184184
185 >>> browser.open(185 >>> browser.open(
186 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'186 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
187 ... 'evolution/+pots/evolution-2.2/es/13/+translate')187 ... 'evolution/+pots/evolution-2.2/es/13/+translate')
188188
189Check that the message #13 is without translation.189Check that the message #13 is without translation.
@@ -273,7 +273,7 @@ We moved to the next message, that means this submission worked.
273Now, it has the submitted value.273Now, it has the submitted value.
274274
275 >>> browser.open(275 >>> browser.open(
276 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'276 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
277 ... 'evolution/+pots/evolution-2.2/es/13/+translate')277 ... 'evolution/+pots/evolution-2.2/es/13/+translate')
278278
279Check that the message #13 has the new value we submitted.279Check that the message #13 has the new value we submitted.
@@ -306,7 +306,7 @@ In some other cases where translator and reviewer are different, they
306are both shown separately:306are both shown separately:
307307
308 >>> browser.open(308 >>> browser.open(
309 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'309 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
310 ... 'evolution/+pots/man/es/1/+translate')310 ... 'evolution/+pots/man/es/1/+translate')
311 >>> find_tag_by_id(browser.contents, 'translated_and_reviewed_by') is None311 >>> find_tag_by_id(browser.contents, 'translated_and_reviewed_by') is None
312 True312 True
@@ -320,7 +320,7 @@ are both shown separately:
320Now, we will check suggestions in this form.320Now, we will check suggestions in this form.
321321
322 >>> browser.open(322 >>> browser.open(
323 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'323 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
324 ... 'evolution/+pots/evolution-2.2/es/14/+translate')324 ... 'evolution/+pots/evolution-2.2/es/14/+translate')
325325
326Check that suggestions come in from other contexts:326Check that suggestions come in from other contexts:
@@ -358,9 +358,9 @@ If we specify more than one alternative language in the URL, we get an
358UnexpectedFormData exception:358UnexpectedFormData exception:
359359
360 >>> browser.open(360 >>> browser.open(
361 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'361 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
362 ... '+pots/evolution-2.2/es/14/+translate?field.alternative_language=ca&'362 ... 'evolution/+pots/evolution-2.2/es/14/+translate'
363 ... 'field.alternative_language=es')363 ... '?field.alternative_language=ca&field.alternative_language=es')
364 Traceback (most recent call last):364 Traceback (most recent call last):
365 ...365 ...
366 UnexpectedFormData: You specified...366 UnexpectedFormData: You specified...
@@ -373,7 +373,7 @@ the changes.
373373
374 >>> slow_submission = setupBrowser(auth='Basic carlos@canonical.com:test')374 >>> slow_submission = setupBrowser(auth='Basic carlos@canonical.com:test')
375 >>> slow_submission.open(375 >>> slow_submission.open(
376 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'376 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
377 ... 'evolution/+pots/evolution-2.2/es/14/+translate')377 ... 'evolution/+pots/evolution-2.2/es/14/+translate')
378 >>> import transaction378 >>> import transaction
379 >>> transaction.commit()379 >>> transaction.commit()
@@ -383,7 +383,7 @@ Now, we get another instance that will be submitted before
383383
384 >>> fast_submission = setupBrowser(auth='Basic carlos@canonical.com:test')384 >>> fast_submission = setupBrowser(auth='Basic carlos@canonical.com:test')
385 >>> fast_submission.open(385 >>> fast_submission.open(
386 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'386 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
387 ... 'evolution/+pots/evolution-2.2/es/14/+translate')387 ... 'evolution/+pots/evolution-2.2/es/14/+translate')
388388
389Let's change the translation.389Let's change the translation.
@@ -475,8 +475,9 @@ If there is a message which has a translation, but no reviewer (eg.
475uploaded from a package), it only shows the translator, and not475uploaded from a package), it only shows the translator, and not
476reviewer.476reviewer.
477477
478 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/+source/'478 >>> browser.open(
479 ... 'mozilla/+pots/pkgconf-mozilla/de/1/+translate')479 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
480 ... 'mozilla/+pots/pkgconf-mozilla/de/1/+translate')
480 >>> print(extract_text(481 >>> print(extract_text(
481 ... find_tag_by_id(browser.contents, "translated_by").parent))482 ... find_tag_by_id(browser.contents, "translated_by").parent))
482 Translated by Helge Kreutzmann on 2005-05-06483 Translated by Helge Kreutzmann on 2005-05-06
@@ -530,8 +531,9 @@ suggestions, even if we keep them to know when were they deactivated.
530531
531Initially, a message has a non-empty packaged translation.532Initially, a message has a non-empty packaged translation.
532533
533 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/'534 >>> browser.open(
534 ... '+source/evolution/+pots/evolution-2.2/es/5/+translate')535 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
536 ... '+source/evolution/+pots/evolution-2.2/es/5/+translate')
535 >>> packaged = find_tag_by_id(browser.contents, 'msgset_134_other')537 >>> packaged = find_tag_by_id(browser.contents, 'msgset_134_other')
536 >>> print(extract_text(packaged))538 >>> print(extract_text(packaged))
537 In upstream: tarjetas539 In upstream: tarjetas
@@ -583,8 +585,9 @@ We replace it with an empty, imported translation:
583If we browse to the page for this message, we won't be able to see a585If we browse to the page for this message, we won't be able to see a
584packaged translation anymore.586packaged translation anymore.
585587
586 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/'588 >>> browser.open(
587 ... '+source/evolution/+pots/evolution-2.2/es/5/+translate')589 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
590 ... '+source/evolution/+pots/evolution-2.2/es/5/+translate')
588 >>> packaged = find_tag_by_id(browser.contents, 'msgset_134_other')591 >>> packaged = find_tag_by_id(browser.contents, 'msgset_134_other')
589592
590Also, the page now displays a "(not translated yet)" message.593Also, the page now displays a "(not translated yet)" message.
diff --git a/lib/lp/translations/stories/translationgroups/xx-translationgroups.txt b/lib/lp/translations/stories/translationgroups/xx-translationgroups.txt
index f4b2b55..c2dbcbd 100644
--- a/lib/lp/translations/stories/translationgroups/xx-translationgroups.txt
+++ b/lib/lp/translations/stories/translationgroups/xx-translationgroups.txt
@@ -750,7 +750,7 @@ Southern Sotho. We expect them to see a readonly form:
750 ... 'Authorization', 'Basic no-priv@canonical.com:test')750 ... 'Authorization', 'Basic no-priv@canonical.com:test')
751 >>> browser.open(751 >>> browser.open(
752 ... 'http://translations.launchpad.test/'752 ... 'http://translations.launchpad.test/'
753 ... 'ubuntu/hoary/+source/evolution/'753 ... 'ubuntu/+series/hoary/+source/evolution/'
754 ... '+pots/evolution-2.2/st/+translate')754 ... '+pots/evolution-2.2/st/+translate')
755 >>> print(browser.url)755 >>> print(browser.url)
756 http://.../ubuntu/.../evolution/+pots/evolution-2.2/st/+translate756 http://.../ubuntu/.../evolution/+pots/evolution-2.2/st/+translate
@@ -772,7 +772,7 @@ directly.
772772
773 >>> browser.open(773 >>> browser.open(
774 ... 'http://translations.launchpad.test/'774 ... 'http://translations.launchpad.test/'
775 ... 'ubuntu/hoary/+source/evolution/'775 ... 'ubuntu/+series/hoary/+source/evolution/'
776 ... '+pots/evolution-2.2/cy/19/+translate')776 ... '+pots/evolution-2.2/cy/19/+translate')
777 >>> print(browser.url)777 >>> print(browser.url)
778 http://.../ubuntu/.../evolution/+pots/evolution-2.2/cy/19/+translate778 http://.../ubuntu/.../evolution/+pots/evolution-2.2/cy/19/+translate
@@ -863,7 +863,7 @@ suggestions.
863863
864 >>> browser.open(864 >>> browser.open(
865 ... 'http://translations.launchpad.test/'865 ... 'http://translations.launchpad.test/'
866 ... 'ubuntu/hoary/+source/evolution/'866 ... 'ubuntu/+series/hoary/+source/evolution/'
867 ... '+pots/evolution-2.2/')867 ... '+pots/evolution-2.2/')
868868
869 >>> print_menu_option(browser.contents, 'edit')869 >>> print_menu_option(browser.contents, 'edit')
@@ -874,7 +874,7 @@ suggestions.
874874
875 >>> browser.open(875 >>> browser.open(
876 ... 'http://translations.launchpad.test/'876 ... 'http://translations.launchpad.test/'
877 ... 'ubuntu/hoary/+source/evolution/'877 ... 'ubuntu/+series/hoary/+source/evolution/'
878 ... '+pots/evolution-2.2/st/+translate')878 ... '+pots/evolution-2.2/st/+translate')
879879
880 >>> print(find_translation_input_label(browser.contents))880 >>> print(find_translation_input_label(browser.contents))
@@ -906,7 +906,7 @@ will only accept suggestions.
906906
907 >>> browser.open(907 >>> browser.open(
908 ... 'http://translations.launchpad.test/'908 ... 'http://translations.launchpad.test/'
909 ... 'ubuntu/hoary/+source/evolution/'909 ... 'ubuntu/+series/hoary/+source/evolution/'
910 ... '+pots/evolution-2.2/st/+translate')910 ... '+pots/evolution-2.2/st/+translate')
911911
912 >>> print(find_translation_input_label(browser.contents))912 >>> print(find_translation_input_label(browser.contents))
@@ -946,7 +946,7 @@ as well as to upload files.
946946
947 >>> browser.open(947 >>> browser.open(
948 ... 'http://translations.launchpad.test/'948 ... 'http://translations.launchpad.test/'
949 ... 'ubuntu/hoary/+source/evolution/'949 ... 'ubuntu/+series/hoary/+source/evolution/'
950 ... '+pots/evolution-2.2/cy/+translate')950 ... '+pots/evolution-2.2/cy/+translate')
951951
952 >>> print_menu_option(browser.contents, 'upload')952 >>> print_menu_option(browser.contents, 'upload')
@@ -957,7 +957,7 @@ not yet translated.
957957
958 >>> browser.open(958 >>> browser.open(
959 ... 'http://translations.launchpad.test/'959 ... 'http://translations.launchpad.test/'
960 ... 'ubuntu/hoary/+source/evolution/'960 ... 'ubuntu/+series/hoary/+source/evolution/'
961 ... '+pots/evolution-2.2/cy/8/+translate')961 ... '+pots/evolution-2.2/cy/8/+translate')
962962
963 >>> print(get_detail_tag(browser, 'translation-managers'))963 >>> print(get_detail_tag(browser, 'translation-managers'))
@@ -1079,8 +1079,8 @@ First, make sure we can see the page.
1079Try to get the page when unauthenticated.1079Try to get the page when unauthenticated.
10801080
1081 >>> browser.open(1081 >>> browser.open(
1082 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/' +1082 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
1083 ... 'evolution/+pots/evolution-2.2/af/+upload')1083 ... 'evolution/+pots/evolution-2.2/af/+upload')
1084 Traceback (most recent call last):1084 Traceback (most recent call last):
1085 ...1085 ...
1086 Unauthorized:...1086 Unauthorized:...
@@ -1088,17 +1088,17 @@ Try to get the page when unauthenticated.
1088And now with valid credentials.1088And now with valid credentials.
10891089
1090 >>> admin_browser.open(1090 >>> admin_browser.open(
1091 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/' +1091 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
1092 ... 'evolution/+pots/evolution-2.2/af/+upload')1092 ... 'evolution/+pots/evolution-2.2/af/+upload')
1093 >>> print(admin_browser.url)1093 >>> print(admin_browser.url)
1094 http://.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/af/+upload1094 http://.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/af/+upload
10951095
1096Now hit the upload button, but without giving a file for upload. We get1096Now hit the upload button, but without giving a file for upload. We get
1097an error message back.1097an error message back.
10981098
1099 >>> admin_browser.getControl('Upload').click()1099 >>> admin_browser.getControl('Upload').click()
1100 >>> print(admin_browser.url)1100 >>> print(admin_browser.url)
1101 http://.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/af/+upload1101 http://.../ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/af/+upload
11021102
1103 >>> for tag in find_tags_by_class(admin_browser.contents, 'error'):1103 >>> for tag in find_tags_by_class(admin_browser.contents, 'error'):
1104 ... print(tag.renderContents())1104 ... print(tag.renderContents())
@@ -1138,7 +1138,7 @@ cannot be handled.
1138 >>> upload.add_file(BytesIO(af_file), 'application/msword', 'af.doc')1138 >>> upload.add_file(BytesIO(af_file), 'application/msword', 'af.doc')
1139 >>> admin_browser.getControl('Upload').click()1139 >>> admin_browser.getControl('Upload').click()
1140 >>> print(admin_browser.url)1140 >>> print(admin_browser.url)
1141 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/af/+upload1141 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/af/+upload
11421142
1143 >>> for tag in find_tags_by_class(admin_browser.contents, 'error'):1143 >>> for tag in find_tags_by_class(admin_browser.contents, 'error'):
1144 ... print(tag.renderContents())1144 ... print(tag.renderContents())
@@ -1151,7 +1151,7 @@ With all the correct information, a file can be uploaded.
1151 >>> upload.add_file(BytesIO(af_file), 'application/x-po', 'af.po')1151 >>> upload.add_file(BytesIO(af_file), 'application/x-po', 'af.po')
1152 >>> admin_browser.getControl('Upload').click()1152 >>> admin_browser.getControl('Upload').click()
1153 >>> print(admin_browser.url)1153 >>> print(admin_browser.url)
1154 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/af/+upload1154 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/af/+upload
11551155
1156 >>> for tag in find_tags_by_class(admin_browser.contents, 'message'):1156 >>> for tag in find_tags_by_class(admin_browser.contents, 'message'):
1157 ... print(tag.renderContents())1157 ... print(tag.renderContents())
@@ -1197,7 +1197,7 @@ Let's add a new suggestion as a person without privileges.
1197 >>> browser.addHeader("Authorization", "Basic no-priv@canonical.com:test")1197 >>> browser.addHeader("Authorization", "Basic no-priv@canonical.com:test")
1198 >>> browser.open(1198 >>> browser.open(
1199 ... 'http://translations.launchpad.test/'1199 ... 'http://translations.launchpad.test/'
1200 ... 'ubuntu/hoary/+source/evolution/'1200 ... 'ubuntu/+series/hoary/+source/evolution/'
1201 ... '+pots/evolution-2.2/es/+translate')1201 ... '+pots/evolution-2.2/es/+translate')
1202 >>> browser.getControl(1202 >>> browser.getControl(
1203 ... name='msgset_134_es_translation_0_new_checkbox').value = True1203 ... name='msgset_134_es_translation_0_new_checkbox').value = True
diff --git a/lib/lp/translations/stories/translations/xx-translations.txt b/lib/lp/translations/stories/translations/xx-translations.txt
index f2cd87d..292b51a 100644
--- a/lib/lp/translations/stories/translations/xx-translations.txt
+++ b/lib/lp/translations/stories/translations/xx-translations.txt
@@ -5,7 +5,7 @@ First, we need to define a function to see that the message we are
5interested on doesn't have any translation.5interested on doesn't have any translation.
66
7 >>> user_browser.open(7 >>> user_browser.open(
8 ... "http://translations.launchpad.test/ubuntu/hoary/+source/"8 ... "http://translations.launchpad.test/ubuntu/+series/hoary/+source/"
9 ... "evolution/+pots/evolution-2.2/es/+translate?start=20")9 ... "evolution/+pots/evolution-2.2/es/+translate?start=20")
1010
11We are going to change message #21, but first, we see that this messages11We are going to change message #21, but first, we see that this messages
@@ -91,14 +91,14 @@ First, we need to ensure that we can see the distroseries translations
91page, and that it has all the data we are expecting, in terms of languages.91page, and that it has all the data we are expecting, in terms of languages.
9292
93 >>> from lp.testing.pages import extract_url_parameter93 >>> from lp.testing.pages import extract_url_parameter
94 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/'94 >>> browser.open('http://translations.launchpad.test/ubuntu/+series/hoary/'
95 ... '+translations')95 ... '+translations')
96 >>> b'Translation status by language' in browser.contents96 >>> b'Translation status by language' in browser.contents
97 True97 True
98 >>> print(browser.getLink('Catalan').url)98 >>> print(browser.getLink('Catalan').url)
99 http://translations.launchpad.test/ubuntu/hoary/+lang/ca99 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/ca
100 >>> print(browser.getLink('Xhosa').url)100 >>> print(browser.getLink('Xhosa').url)
101 http://translations.launchpad.test/ubuntu/hoary/+lang/xh101 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/xh
102 >>> browser.getLink('Afrihili')102 >>> browser.getLink('Afrihili')
103 Traceback (most recent call last):103 Traceback (most recent call last):
104 ...104 ...
@@ -110,16 +110,17 @@ our browser speaks Afrihili, and since the user is anonymous the system will
110put Afrihili into the list of "preferred languages".110put Afrihili into the list of "preferred languages".
111111
112 >>> browser.addHeader('Accept-Language', 'en-us,en;q=0.7,afh;q=0.3')112 >>> browser.addHeader('Accept-Language', 'en-us,en;q=0.7,afh;q=0.3')
113 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/'113 >>> browser.open(
114 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
114 ... '+translations')115 ... '+translations')
115 >>> b'Translation status by language' in browser.contents116 >>> b'Translation status by language' in browser.contents
116 True117 True
117 >>> print(browser.getLink('Catalan').url)118 >>> print(browser.getLink('Catalan').url)
118 http://translations.launchpad.test/ubuntu/hoary/+lang/ca119 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/ca
119 >>> print(browser.getLink('Xhosa').url)120 >>> print(browser.getLink('Xhosa').url)
120 http://translations.launchpad.test/ubuntu/hoary/+lang/xh121 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/xh
121 >>> print(browser.getLink('Afrihili').url)122 >>> print(browser.getLink('Afrihili').url)
122 http://translations.launchpad.test/ubuntu/hoary/+lang/afh123 http://translations.launchpad.test/ubuntu/+series/hoary/+lang/afh
123124
124If we select Croatian, we would expect to see the list of source package125If we select Croatian, we would expect to see the list of source package
125templates, and in the sample data we should have a croatian pofile for126templates, and in the sample data we should have a croatian pofile for
@@ -127,15 +128,16 @@ pmount. Note that we should also have an empty pofile (really a dummy
127pofile) for evolution-2.2128pofile) for evolution-2.2
128129
129 >>> browser.open(130 >>> browser.open(
130 ... 'http://translations.launchpad.test/ubuntu/hoary/+lang/hr?batch=2')131 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/hr'
132 ... '?batch=2')
131 >>> b'Croatian' in browser.contents133 >>> b'Croatian' in browser.contents
132 True134 True
133 >>> b'Translatable templates' in browser.contents135 >>> b'Translatable templates' in browser.contents
134 True136 True
135 >>> print(browser.getLink('evolution-2.2').url)137 >>> print(browser.getLink('evolution-2.2').url)
136 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/hr/+translate138 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/hr/+translate
137 >>> print(browser.getLink('man').url)139 >>> print(browser.getLink('man').url)
138 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/man/hr/+translate140 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/man/hr/+translate
139141
140pmount and pkgconf-mozilla are not in this page, because it belongs to the next batch.142pmount and pkgconf-mozilla are not in this page, because it belongs to the next batch.
141143
@@ -155,9 +157,9 @@ Let's go to next page.
155Now, we have the other man and pkgconf-mozilla:157Now, we have the other man and pkgconf-mozilla:
156158
157 >>> print(browser.getLink('man').url)159 >>> print(browser.getLink('man').url)
158 http://translations.launchpad.test/ubuntu/hoary/+source/pmount/+pots/man/hr/+translate160 http://translations.launchpad.test/ubuntu/+series/hoary/+source/pmount/+pots/man/hr/+translate
159 >>> print(browser.getLink('pkgconf-mozilla').url)161 >>> print(browser.getLink('pkgconf-mozilla').url)
160 http://translations.launchpad.test/ubuntu/hoary/+source/mozilla/+pots/pkgconf-mozilla/hr/+translate162 http://translations.launchpad.test/ubuntu/+series/hoary/+source/mozilla/+pots/pkgconf-mozilla/hr/+translate
161163
162Let's go to next page.164Let's go to next page.
163165
@@ -166,7 +168,7 @@ Let's go to next page.
166And finally, we will get pmount.168And finally, we will get pmount.
167169
168 >>> print(browser.getLink('pmount').url)170 >>> print(browser.getLink('pmount').url)
169 http://translations.launchpad.test/ubuntu/hoary/+source/pmount/+pots/pmount/hr/+translate171 http://translations.launchpad.test/ubuntu/+series/hoary/+source/pmount/+pots/pmount/hr/+translate
170172
171With its latest translator.173With its latest translator.
172174
@@ -179,7 +181,8 @@ When there's no reviewer and date of review on a last touched PO message
179inside a PO file (for example, when it was uploaded from the package), the181inside a PO file (for example, when it was uploaded from the package), the
180last translator is displayed.182last translator is displayed.
181183
182 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/+lang/de')184 >>> browser.open(
185 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/de')
183 >>> print(extract_text(186 >>> print(extract_text(
184 ... find_tag_by_id(browser.contents, "pkgconf-mozilla-time")))187 ... find_tag_by_id(browser.contents, "pkgconf-mozilla-time")))
185 2005-05-06188 2005-05-06
@@ -194,8 +197,8 @@ decided to start contributing translations to that package.
194197
195 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')198 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
196 >>> browser.open(199 >>> browser.open(
197 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/pmount/'200 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
198 ... '+pots/pmount/pt_BR/+translate')201 ... 'pmount/+pots/pmount/pt_BR/+translate')
199202
200Then he decides that he only wants to filter on untranslated entries (he's203Then he decides that he only wants to filter on untranslated entries (he's
201not aware that this translation is actually empty, i.e. there is no such PO204not aware that this translation is actually empty, i.e. there is no such PO
@@ -233,7 +236,8 @@ Looking at the Spanish language overview page, we can see that there are
23315 untranslated, 1 unreviewed and 1 changed in Ubuntu Evolution translations23615 untranslated, 1 unreviewed and 1 changed in Ubuntu Evolution translations
234(all numbers repeated as hidden 'sortkey' values).237(all numbers repeated as hidden 'sortkey' values).
235238
236 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/+lang/es')239 >>> browser.open(
240 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+lang/es')
237 >>> evolution_line = find_tag_by_id(browser.contents, 'evolution-2.2')241 >>> evolution_line = find_tag_by_id(browser.contents, 'evolution-2.2')
238 >>> print(extract_text(evolution_line))242 >>> print(extract_text(evolution_line))
239 evolution-2.2243 evolution-2.2
@@ -252,7 +256,7 @@ The template title points to the general translate page:
252 >>> print(extract_text(unfiltered))256 >>> print(extract_text(unfiltered))
253 evolution-2.2257 evolution-2.2
254 >>> print(extract_link_from_tag(unfiltered, base_href))258 >>> print(extract_link_from_tag(unfiltered, base_href))
255 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate259 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate
256260
257The number of untranslated entries points to the same page, which now show261The number of untranslated entries points to the same page, which now show
258only untranslated items. When we follow this link, the filtering combo box262only untranslated items. When we follow this link, the filtering combo box
@@ -264,7 +268,7 @@ has the right filter preselected.
264 >>> untranslated_link = extract_link_from_tag(untranslated, base_href)268 >>> untranslated_link = extract_link_from_tag(untranslated, base_href)
265 >>> browser.open(untranslated_link.encode('UTF-8'))269 >>> browser.open(untranslated_link.encode('UTF-8'))
266 >>> browser.url270 >>> browser.url
267 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=untranslated'271 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=untranslated'
268 >>> print(browser.getControl(name='show', index=1).value)272 >>> print(browser.getControl(name='show', index=1).value)
269 ['untranslated']273 ['untranslated']
270274
@@ -277,7 +281,7 @@ with the 'with new suggestions' filter selected.
277 >>> unreviewed_link = extract_link_from_tag(unreviewed, base_href)281 >>> unreviewed_link = extract_link_from_tag(unreviewed, base_href)
278 >>> browser.open(unreviewed_link.encode('UTF-8'))282 >>> browser.open(unreviewed_link.encode('UTF-8'))
279 >>> browser.url283 >>> browser.url
280 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=new_suggestions'284 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=new_suggestions'
281 >>> print(browser.getControl(name='show', index=1).value)285 >>> print(browser.getControl(name='show', index=1).value)
282 ['new_suggestions']286 ['new_suggestions']
283287
@@ -290,7 +294,7 @@ The number of updated entries points to the translation page with the
290 >>> updated_link = extract_link_from_tag(updated, base_href)294 >>> updated_link = extract_link_from_tag(updated, base_href)
291 >>> browser.open(updated_link.encode('UTF-8'))295 >>> browser.open(updated_link.encode('UTF-8'))
292 >>> browser.url296 >>> browser.url
293 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=changed_in_ubuntu'297 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=changed_in_ubuntu'
294 >>> print(browser.getControl(name='show', index=1).value)298 >>> print(browser.getControl(name='show', index=1).value)
295 ['changed_in_ubuntu']299 ['changed_in_ubuntu']
296300
@@ -327,16 +331,16 @@ will again see the legend.
327The same happens for template overview page for packages.331The same happens for template overview page for packages.
328332
329 >>> anon_browser.open(333 >>> anon_browser.open(
330 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'334 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
331 ... '+translations')335 ... 'evolution/+translations')
332 >>> find_tag_by_id(anon_browser.contents, 'legend') is None336 >>> find_tag_by_id(anon_browser.contents, 'legend') is None
333 True337 True
334338
335And with at least one translation, legend is shown.339And with at least one translation, legend is shown.
336340
337 >>> anon_browser.open(341 >>> anon_browser.open(
338 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/'342 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
339 ... '+pots/man')343 ... 'evolution/+pots/man')
340 >>> find_tag_by_id(anon_browser.contents, 'legend') is None344 >>> find_tag_by_id(anon_browser.contents, 'legend') is None
341 False345 False
342346
@@ -359,8 +363,8 @@ And likewise for PO template pages for templates without translations
359in packages:363in packages:
360364
361 >>> anon_browser.open(365 >>> anon_browser.open(
362 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/pmount/'366 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
363 ... '+pots/man')367 ... 'pmount/+pots/man')
364 >>> find_tag_by_id(anon_browser.contents, 'legend') is None368 >>> find_tag_by_id(anon_browser.contents, 'legend') is None
365 True369 True
366370
@@ -374,7 +378,7 @@ should see Catalan in the list.
374378
375 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')379 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
376 >>> browser.open(380 >>> browser.open(
377 ... 'http://translations.launchpad.test/ubuntu/hoary/+source/'381 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/'
378 ... 'evolution/+translations')382 ... 'evolution/+translations')
379 >>> b'Catalan' in browser.contents383 >>> b'Catalan' in browser.contents
380 True384 True
@@ -406,8 +410,9 @@ Looking at the POTemplate overview page, we can see that there are
40615 untranslated, 1 unreviewed and 1 changed in Ubuntu Spanish translations41015 untranslated, 1 unreviewed and 1 changed in Ubuntu Spanish translations
407(all numbers repeated as hidden 'sortkey' values).411(all numbers repeated as hidden 'sortkey' values).
408412
409 >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/'+413 >>> browser.open(
410 ... '+source/evolution/+pots/evolution-2.2')414 ... 'http://translations.launchpad.test/ubuntu/+series/hoary/'
415 ... '+source/evolution/+pots/evolution-2.2')
411 >>> spanish_line = find_tag_by_id(browser.contents, 'evolution-2.2_es')416 >>> spanish_line = find_tag_by_id(browser.contents, 'evolution-2.2_es')
412 >>> print(extract_text(spanish_line))417 >>> print(extract_text(spanish_line))
413 Spanish418 Spanish
@@ -425,7 +430,7 @@ Language title points to the general translate page:
425 >>> print(extract_text(unfiltered))430 >>> print(extract_text(unfiltered))
426 Spanish431 Spanish
427 >>> print(extract_link_from_tag(unfiltered, base_href))432 >>> print(extract_link_from_tag(unfiltered, base_href))
428 http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate433 http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate
429434
430The number of untranslated entries points to the same page, which now shows435The number of untranslated entries points to the same page, which now shows
431only untranslated items. When we follow this link, the filtering combo box has436only untranslated items. When we follow this link, the filtering combo box has
@@ -437,7 +442,7 @@ the right filter preselected.
437 >>> untranslated_link = extract_link_from_tag(untranslated, base_href)442 >>> untranslated_link = extract_link_from_tag(untranslated, base_href)
438 >>> browser.open(untranslated_link.encode('UTF-8'))443 >>> browser.open(untranslated_link.encode('UTF-8'))
439 >>> browser.url444 >>> browser.url
440 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=untranslated'445 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=untranslated'
441 >>> print(browser.getControl(name='show', index=2).value)446 >>> print(browser.getControl(name='show', index=2).value)
442 untranslated447 untranslated
443448
@@ -450,7 +455,7 @@ with the 'with new suggestions' filter selected.
450 >>> unreviewed_link = extract_link_from_tag(unreviewed, base_href)455 >>> unreviewed_link = extract_link_from_tag(unreviewed, base_href)
451 >>> browser.open(unreviewed_link.encode('UTF-8'))456 >>> browser.open(unreviewed_link.encode('UTF-8'))
452 >>> browser.url457 >>> browser.url
453 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=new_suggestions'458 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=new_suggestions'
454 >>> print(browser.getControl(name='show', index=2).value)459 >>> print(browser.getControl(name='show', index=2).value)
455 new_suggestions460 new_suggestions
456461
@@ -463,6 +468,6 @@ The number of updated entries points to the translation page with the
463 >>> updated_link = extract_link_from_tag(updated, base_href)468 >>> updated_link = extract_link_from_tag(updated, base_href)
464 >>> browser.open(updated_link.encode('UTF-8'))469 >>> browser.open(updated_link.encode('UTF-8'))
465 >>> browser.url470 >>> browser.url
466 'http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=changed_in_ubuntu'471 'http://translations.launchpad.test/ubuntu/+series/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=changed_in_ubuntu'
467 >>> print(browser.getControl(name='show', index=2).value)472 >>> print(browser.getControl(name='show', index=2).value)
468 changed_in_ubuntu473 changed_in_ubuntu
diff --git a/lib/lp/translations/stories/webservice/xx-potemplate.txt b/lib/lp/translations/stories/webservice/xx-potemplate.txt
index 032ab5b..2cd4681 100644
--- a/lib/lp/translations/stories/webservice/xx-potemplate.txt
+++ b/lib/lp/translations/stories/webservice/xx-potemplate.txt
@@ -9,7 +9,7 @@ Anonymous users have read access to PO templates attributes.
99
10 >>> from lazr.restful.testing.webservice import pprint_entry10 >>> from lazr.restful.testing.webservice import pprint_entry
11 >>> potemplate = anon_webservice.get(11 >>> potemplate = anon_webservice.get(
12 ... '/ubuntu/hoary/+source/pmount/+pots/pmount').jsonBody()12 ... '/ubuntu/+series/hoary/+source/pmount/+pots/pmount').jsonBody()
13 >>> pprint_entry(potemplate)13 >>> pprint_entry(potemplate)
14 active: True14 active: True
15 date_last_updated: '2005-05-06T20:09:23.775993+00:00'15 date_last_updated: '2005-05-06T20:09:23.775993+00:00'
@@ -24,11 +24,12 @@ Anonymous users have read access to PO templates attributes.
24 path: 'po/template.pot'24 path: 'po/template.pot'
25 priority: 025 priority: 0
26 resource_type_link: 'http://.../#translation_template'26 resource_type_link: 'http://.../#translation_template'
27 self_link: 'http://.../ubuntu/hoary/+source/pmount/+pots/pmount'27 self_link: 'http://.../ubuntu/+series/hoary/+source/pmount/+pots/pmount'
28 translation_domain: 'pmount'28 translation_domain: 'pmount'
29 translation_files_collection_link:29 translation_files_collection_link:
30 'http://.../pmount/+pots/pmount/translation_files'30 'http://.../pmount/+pots/pmount/translation_files'
31 web_link: 'http://translati.../ubuntu/hoary/+source/pmount/+pots/pmount'31 web_link:
32 'http://translati.../ubuntu/+series/hoary/+source/pmount/+pots/pmount'
3233
33"translation_files" will list all POFiles associated with this template.34"translation_files" will list all POFiles associated with this template.
3435
@@ -55,7 +56,7 @@ All templates associated to a distribution series are available from the
55 >>> db_count = len(list(templates))56 >>> db_count = len(list(templates))
56 >>> logout()57 >>> logout()
57 >>> all_translation_templates = anon_webservice.named_get(58 >>> all_translation_templates = anon_webservice.named_get(
58 ... '/ubuntu/hoary/', 'getTranslationTemplates').jsonBody()59 ... '/ubuntu/+series/hoary/', 'getTranslationTemplates').jsonBody()
59 >>> api_count = all_translation_templates['total_size']60 >>> api_count = all_translation_templates['total_size']
60 >>> api_count == db_count61 >>> api_count == db_count
61 True62 True
@@ -111,7 +112,7 @@ All translation templates for a source package are available using the
111 >>> db_count = len(list(templates))112 >>> db_count = len(list(templates))
112 >>> logout()113 >>> logout()
113 >>> all_translation_templates = anon_webservice.named_get(114 >>> all_translation_templates = anon_webservice.named_get(
114 ... '/ubuntu/hoary/+source/evolution',115 ... '/ubuntu/+series/hoary/+source/evolution',
115 ... 'getTranslationTemplates').jsonBody()116 ... 'getTranslationTemplates').jsonBody()
116 >>> api_count = all_translation_templates['total_size']117 >>> api_count = all_translation_templates['total_size']
117 >>> api_count == db_count118 >>> api_count == db_count

Subscribers

People subscribed via source and target branches

to status/vote changes: