Merge ~cjwatson/launchpad:registry-pagetests-future-imports into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 9ccfa7a9b9ef5c361399b27bd03c0fffa5264c99
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:registry-pagetests-future-imports
Merge into: launchpad:master
Diff against target: 8387 lines (+1213/-1207)
102 files modified
lib/lp/registry/stories/announcements/xx-announcements.txt (+47/-47)
lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt (+23/-23)
lib/lp/registry/stories/distribution/xx-distribution-overview.txt (+15/-15)
lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt (+6/-6)
lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt (+3/-3)
lib/lp/registry/stories/distroseries/distroseries-admin.txt (+12/-12)
lib/lp/registry/stories/distroseries/xx-distroseries-index.txt (+15/-15)
lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt (+12/-12)
lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt (+26/-26)
lib/lp/registry/stories/gpg-coc/xx-ubuntu-codeofconduct-signer.txt (+5/-5)
lib/lp/registry/stories/location/personlocation-edit.txt (+1/-1)
lib/lp/registry/stories/mailinglists/hosted-email-address.txt (+5/-5)
lib/lp/registry/stories/mailinglists/lifecycle.txt (+33/-33)
lib/lp/registry/stories/mailinglists/subscriptions.txt (+43/-43)
lib/lp/registry/stories/mailinglists/welcome-message.txt (+3/-3)
lib/lp/registry/stories/milestone/object-milestones.txt (+33/-33)
lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt (+2/-2)
lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt (+11/-11)
lib/lp/registry/stories/milestone/xx-milestone-description.txt (+4/-4)
lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt (+3/-3)
lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt (+4/-4)
lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt (+6/-6)
lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt (+24/-24)
lib/lp/registry/stories/person/xx-add-sshkey.txt (+22/-22)
lib/lp/registry/stories/person/xx-admin-person-review.txt (+8/-8)
lib/lp/registry/stories/person/xx-approve-members.txt (+4/-4)
lib/lp/registry/stories/person/xx-deactivate-account.txt (+4/-4)
lib/lp/registry/stories/person/xx-people-index.txt (+2/-2)
lib/lp/registry/stories/person/xx-people-search.txt (+6/-6)
lib/lp/registry/stories/person/xx-person-claim-merge.txt (+1/-1)
lib/lp/registry/stories/person/xx-person-edit-jabber-ids.txt (+3/-3)
lib/lp/registry/stories/person/xx-person-edit.txt (+2/-2)
lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt (+4/-4)
lib/lp/registry/stories/person/xx-person-home.txt (+39/-39)
lib/lp/registry/stories/person/xx-person-karma.txt (+8/-8)
lib/lp/registry/stories/person/xx-person-projects.txt (+6/-6)
lib/lp/registry/stories/person/xx-person-rdf.txt (+6/-6)
lib/lp/registry/stories/person/xx-person-subscriptions.txt (+25/-25)
lib/lp/registry/stories/person/xx-person-working-on.txt (+2/-2)
lib/lp/registry/stories/person/xx-user-to-user.txt (+8/-8)
lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt (+6/-4)
lib/lp/registry/stories/pillar/xx-pillar-sprints.txt (+1/-1)
lib/lp/registry/stories/product/xx-launchpad-project-search.txt (+10/-10)
lib/lp/registry/stories/product/xx-product-add.txt (+20/-20)
lib/lp/registry/stories/product/xx-product-code-trunk.txt (+10/-10)
lib/lp/registry/stories/product/xx-product-edit-sourceforge-project.txt (+1/-1)
lib/lp/registry/stories/product/xx-product-edit.txt (+26/-26)
lib/lp/registry/stories/product/xx-product-files.txt (+26/-26)
lib/lp/registry/stories/product/xx-product-index.txt (+30/-30)
lib/lp/registry/stories/product/xx-product-package-pages.txt (+13/-13)
lib/lp/registry/stories/product/xx-product-rdf.txt (+2/-2)
lib/lp/registry/stories/product/xx-product-reassignment-and-milestones.txt (+2/-2)
lib/lp/registry/stories/product/xx-productset.txt (+6/-6)
lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt (+14/-14)
lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt (+9/-9)
lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt (+2/-2)
lib/lp/registry/stories/productrelease/xx-productrelease-view.txt (+6/-6)
lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt (+8/-8)
lib/lp/registry/stories/productseries/xx-productseries-delete.txt (+17/-17)
lib/lp/registry/stories/productseries/xx-productseries-driver.txt (+5/-5)
lib/lp/registry/stories/productseries/xx-productseries-index.txt (+15/-15)
lib/lp/registry/stories/productseries/xx-productseries-rdf.txt (+2/-2)
lib/lp/registry/stories/productseries/xx-productseries-review.txt (+4/-4)
lib/lp/registry/stories/productseries/xx-productseries-series.txt (+7/-7)
lib/lp/registry/stories/productseries/xx-productseries-set-branch.txt (+7/-7)
lib/lp/registry/stories/project/xx-project-add-product.txt (+3/-3)
lib/lp/registry/stories/project/xx-project-add.txt (+1/-1)
lib/lp/registry/stories/project/xx-project-driver.txt (+2/-2)
lib/lp/registry/stories/project/xx-project-edit.txt (+17/-17)
lib/lp/registry/stories/project/xx-project-index.txt (+7/-7)
lib/lp/registry/stories/project/xx-project-rdf.txt (+2/-2)
lib/lp/registry/stories/project/xx-reassign-project.txt (+8/-8)
lib/lp/registry/stories/team-polls/create-poll-options.txt (+2/-2)
lib/lp/registry/stories/team-polls/edit-options.txt (+3/-2)
lib/lp/registry/stories/team-polls/edit-poll.txt (+4/-4)
lib/lp/registry/stories/team-polls/vote-poll.txt (+15/-15)
lib/lp/registry/stories/team-polls/xx-poll-condorcet-voting.txt (+20/-20)
lib/lp/registry/stories/team-polls/xx-poll-confirm-vote.txt (+8/-8)
lib/lp/registry/stories/team-polls/xx-poll-results.txt (+3/-3)
lib/lp/registry/stories/team/xx-team-add-my-teams.txt (+12/-12)
lib/lp/registry/stories/team/xx-team-claim.txt (+4/-4)
lib/lp/registry/stories/team/xx-team-contactemail-xss.txt (+3/-3)
lib/lp/registry/stories/team/xx-team-home.txt (+54/-54)
lib/lp/registry/stories/team/xx-team-membership.txt (+19/-19)
lib/lp/registry/stories/teammembership/private-team.txt (+1/-1)
lib/lp/registry/stories/teammembership/xx-add-member.txt (+11/-11)
lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt (+10/-10)
lib/lp/registry/stories/teammembership/xx-renew-subscription.txt (+4/-4)
lib/lp/registry/stories/teammembership/xx-team-leave.txt (+8/-8)
lib/lp/registry/stories/teammembership/xx-teammembership.txt (+21/-21)
lib/lp/registry/stories/webservice/xx-derivedistroseries.txt (+5/-5)
lib/lp/registry/stories/webservice/xx-distribution-mirror.txt (+6/-6)
lib/lp/registry/stories/webservice/xx-distribution-source-package.txt (+7/-7)
lib/lp/registry/stories/webservice/xx-distribution.txt (+13/-13)
lib/lp/registry/stories/webservice/xx-distroseries.txt (+7/-7)
lib/lp/registry/stories/webservice/xx-person.txt (+59/-59)
lib/lp/registry/stories/webservice/xx-personlocation.txt (+8/-8)
lib/lp/registry/stories/webservice/xx-private-team.txt (+25/-25)
lib/lp/registry/stories/webservice/xx-project-registry.txt (+78/-78)
lib/lp/registry/stories/webservice/xx-source-package.txt (+8/-8)
lib/lp/registry/stories/webservice/xx-structuralsubscription.txt (+16/-16)
lib/lp/registry/tests/test_doc.py (+4/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+392377@code.launchpad.net

Commit message

Convert lp.registry pagetests to preferred __future__ imports

Description of the change

This is very large, but with the exception of the change to lib/lp/registry/tests/test_doc.py it consists entirely of mechanical print function conversions.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

This is sufficiently large and mechanical that it isn't likely to be worth anyone else's time to review - I'm going to self-approve it since it's in line with other previous similar conversions.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/registry/stories/announcements/xx-announcements.txt b/lib/lp/registry/stories/announcements/xx-announcements.txt
index e0ffc0b..9a12076 100644
--- a/lib/lp/registry/stories/announcements/xx-announcements.txt
+++ b/lib/lp/registry/stories/announcements/xx-announcements.txt
@@ -83,22 +83,22 @@ pillar.
83 >>> priv_browser = setupBrowser(auth="Basic mark@example.com:test")83 >>> priv_browser = setupBrowser(auth="Basic mark@example.com:test")
84 >>> priv_browser.open('http://launchpad.test/ubuntu')84 >>> priv_browser.open('http://launchpad.test/ubuntu')
85 >>> link = priv_browser.getLink('Make announcement')85 >>> link = priv_browser.getLink('Make announcement')
86 >>> print link.text86 >>> print(link.text)
87 Make announcement87 Make announcement
8888
89 >>> priv_browser.getLink('Read all announcements').click()89 >>> priv_browser.getLink('Read all announcements').click()
90 >>> link = priv_browser.getLink('Make announcement')90 >>> link = priv_browser.getLink('Make announcement')
91 >>> print link.text91 >>> print(link.text)
92 Make announcement92 Make announcement
9393
94 >>> priv_browser.open('http://launchpad.test/firefox')94 >>> priv_browser.open('http://launchpad.test/firefox')
95 >>> link = priv_browser.getLink('Make announcement')95 >>> link = priv_browser.getLink('Make announcement')
96 >>> print link.text96 >>> print(link.text)
97 Make announcement97 Make announcement
9898
99 >>> priv_browser.getLink('Read all announcements').click()99 >>> priv_browser.getLink('Read all announcements').click()
100 >>> link = priv_browser.getLink('Make announcement')100 >>> link = priv_browser.getLink('Make announcement')
101 >>> print link.text101 >>> print(link.text)
102 Make announcement102 Make announcement
103103
104104
@@ -118,9 +118,9 @@ announcement:
118Making the announcement takes the user back to the main page for the118Making the announcement takes the user back to the main page for the
119project.119project.
120120
121 >>> print priv_browser.url121 >>> print(priv_browser.url)
122 http://launchpad.test/apache122 http://launchpad.test/apache
123 >>> print priv_browser.title123 >>> print(priv_browser.title)
124 Apache in Launchpad124 Apache in Launchpad
125125
126We'll repeat the process for Tomcat, an IProduct that is part of the126We'll repeat the process for Tomcat, an IProduct that is part of the
@@ -134,8 +134,8 @@ announcement so there is a "Latest news" portlet. Let's render the
134portlet, taking care not to render today's date which would timebomb our134portlet, taking care not to render today's date which would timebomb our
135script.135script.
136136
137 >>> print latest_news(priv_browser.contents).encode(137 >>> print(latest_news(priv_browser.contents).encode(
138 ... 'ascii', 'backslashreplace')138 ... 'ascii', 'backslashreplace'))
139 Announcements139 Announcements
140 Apache announcement headline...140 Apache announcement headline...
141 Read all announcements141 Read all announcements
@@ -154,13 +154,13 @@ work too:
154 ... name='field.publication_date.announcement_date').value = (154 ... name='field.publication_date.announcement_date').value = (
155 ... '2007-11-24 09:00:00')155 ... '2007-11-24 09:00:00')
156 >>> priv_browser.getControl('Make announcement').click()156 >>> priv_browser.getControl('Make announcement').click()
157 >>> print priv_browser.title157 >>> print(priv_browser.title)
158 Tomcat in Launchpad158 Tomcat in Launchpad
159159
160And check out the results:160And check out the results:
161161
162 >>> print latest_news(priv_browser.contents).encode(162 >>> print(latest_news(priv_browser.contents).encode(
163 ... 'ascii', 'backslashreplace')163 ... 'ascii', 'backslashreplace'))
164 Announcements164 Announcements
165 Apache announcement headline ...165 Apache announcement headline ...
166 Tomcat announcement headline on 2007-11-24 ...166 Tomcat announcement headline on 2007-11-24 ...
@@ -169,7 +169,7 @@ And check out the results:
169169
170Let's make sure that the announcement is presented as a link.170Let's make sure that the announcement is presented as a link.
171171
172 >>> print priv_browser.getLink('Tomcat announcement headline').url172 >>> print(priv_browser.getLink('Tomcat announcement headline').url)
173 http://launchpad.test/tomcat/+announcement/...173 http://launchpad.test/tomcat/+announcement/...
174174
175We'll repeat the process for Derby, an IProduct that is part of the175We'll repeat the process for Derby, an IProduct that is part of the
@@ -185,7 +185,7 @@ announcement immediately:
185 >>> priv_browser.getControl('Summary').value = (185 >>> priv_browser.getControl('Summary').value = (
186 ... 'Derby announcement summary')186 ... 'Derby announcement summary')
187 >>> priv_browser.getControl('Make announcement').click()187 >>> priv_browser.getControl('Make announcement').click()
188 >>> print priv_browser.title188 >>> print(priv_browser.title)
189 Derby in Launchpad189 Derby in Launchpad
190 >>> 'Derby announcement' in latest_news(priv_browser.contents)190 >>> 'Derby announcement' in latest_news(priv_browser.contents)
191 True191 True
@@ -205,7 +205,7 @@ date in the future when the announcement will be made:
205 ... name='field.publication_date.announcement_date').value = (205 ... name='field.publication_date.announcement_date').value = (
206 ... '2021-12-24 09:00:00')206 ... '2021-12-24 09:00:00')
207 >>> priv_browser.getControl('Make announcement').click()207 >>> priv_browser.getControl('Make announcement').click()
208 >>> print priv_browser.title208 >>> print(priv_browser.title)
209 Jokosher in Launchpad209 Jokosher in Launchpad
210 >>> 'Jokosher announcement' in latest_news(priv_browser.contents)210 >>> 'Jokosher announcement' in latest_news(priv_browser.contents)
211 True211 True
@@ -221,7 +221,7 @@ a date for the announcement at all:
221 ... 'Kubuntu announcement summary')221 ... 'Kubuntu announcement summary')
222 >>> priv_browser.getControl('some time in the future').click()222 >>> priv_browser.getControl('some time in the future').click()
223 >>> priv_browser.getControl('Make announcement').click()223 >>> priv_browser.getControl('Make announcement').click()
224 >>> print priv_browser.title224 >>> print(priv_browser.title)
225 Kubuntu in Launchpad225 Kubuntu in Launchpad
226 >>> "Kubuntu announcement" in latest_news(priv_browser.contents)226 >>> "Kubuntu announcement" in latest_news(priv_browser.contents)
227 True227 True
@@ -235,7 +235,7 @@ And finally for RedHat, an IDistribution, with immediate announcement:
235 >>> priv_browser.getControl('Summary').value = (235 >>> priv_browser.getControl('Summary').value = (
236 ... 'RedHat announcement summary')236 ... 'RedHat announcement summary')
237 >>> priv_browser.getControl('Make announcement').click()237 >>> priv_browser.getControl('Make announcement').click()
238 >>> print priv_browser.title238 >>> print(priv_browser.title)
239 Red Hat in Launchpad239 Red Hat in Launchpad
240 >>> "RedHat announcement" in latest_news(priv_browser.contents)240 >>> "RedHat announcement" in latest_news(priv_browser.contents)
241 True241 True
@@ -264,21 +264,21 @@ published:
264264
265 >>> anon_browser.open('http://launchpad.test/apache/+announcements')265 >>> anon_browser.open('http://launchpad.test/apache/+announcements')
266 >>> anon_browser.getLink('Derby announcement headline').click()266 >>> anon_browser.getLink('Derby announcement headline').click()
267 >>> print anon_browser.title267 >>> print(anon_browser.title)
268 Derby announcement headline : Derby268 Derby announcement headline : Derby
269269
270The page shows the announcement and it has a link back to the announcements270The page shows the announcement and it has a link back to the announcements
271page that any user can navigate.271page that any user can navigate.
272272
273 >>> content = find_main_content(anon_browser.contents)273 >>> content = find_main_content(anon_browser.contents)
274 >>> print extract_text(content.h1)274 >>> print(extract_text(content.h1))
275 Derby announcement headline275 Derby announcement headline
276276
277 >>> print extract_text(content.findAll('p')[1])277 >>> print(extract_text(content.findAll('p')[1]))
278 Derby announcement summary278 Derby announcement summary
279279
280 >>> anon_browser.getLink("Read all announcements").click()280 >>> anon_browser.getLink("Read all announcements").click()
281 >>> print anon_browser.title281 >>> print(anon_browser.title)
282 News and announcements...282 News and announcements...
283283
284284
@@ -366,9 +366,9 @@ We can publish this announcement immediately.
366366
367 >>> priv_browser.getLink('Kubuntu announcement headline').click()367 >>> priv_browser.getLink('Kubuntu announcement headline').click()
368 >>> priv_browser.getLink('Publish announcement').click()368 >>> priv_browser.getLink('Publish announcement').click()
369 >>> print priv_browser.title369 >>> print(priv_browser.title)
370 Publish announcement : Kubuntu announcement headline : Kubuntu370 Publish announcement : Kubuntu announcement headline : Kubuntu
371 >>> print priv_browser.url371 >>> print(priv_browser.url)
372 http://launchpad.test/kubuntu/+announceme.../+publish372 http://launchpad.test/kubuntu/+announceme.../+publish
373 >>> radio = priv_browser.getControl(name="field.publication_date.action")373 >>> radio = priv_browser.getControl(name="field.publication_date.action")
374 >>> radio.value = ['immediately']374 >>> radio.value = ['immediately']
@@ -376,7 +376,7 @@ We can publish this announcement immediately.
376376
377Doing so takes us back to the list of announcements.377Doing so takes us back to the list of announcements.
378378
379 >>> print priv_browser.title379 >>> print(priv_browser.title)
380 News and announcements...380 News and announcements...
381381
382And since the announcement has been made, the everybody can now see382And since the announcement has been made, the everybody can now see
@@ -464,7 +464,7 @@ hosted in Launchpad:
464The announcements are batched so only the latest four are shown,464The announcements are batched so only the latest four are shown,
465leaving Tomcat out:465leaving Tomcat out:
466466
467 >>> print extract_text(anon_browser.contents)467 >>> print(extract_text(anon_browser.contents))
468 Announcements from all projects hosted in Launchpad468 Announcements from all projects hosted in Launchpad
469 ...469 ...
470 1...4 of 25 results470 1...4 of 25 results
@@ -486,34 +486,34 @@ The announcement listing page does not have editing links. They are
486available on the individual announcement pages.486available on the individual announcement pages.
487487
488 >>> priv_browser.open('http://launchpad.test/tomcat/+announcements')488 >>> priv_browser.open('http://launchpad.test/tomcat/+announcements')
489 >>> print priv_browser.getLink('Read more').url489 >>> print(priv_browser.getLink('Read more').url)
490 http://apache.org/announcement/rocking/490 http://apache.org/announcement/rocking/
491 >>> priv_browser.getLink('Apache announcement headline').click()491 >>> priv_browser.getLink('Apache announcement headline').click()
492 >>> priv_browser.getLink('Modify announcement').click()492 >>> priv_browser.getLink('Modify announcement').click()
493 >>> print priv_browser.title493 >>> print(priv_browser.title)
494 Modify announcement : Apache announcement headline : Apache494 Modify announcement : Apache announcement headline : Apache
495 >>> headline = priv_browser.getControl('Headline')495 >>> headline = priv_browser.getControl('Headline')
496 >>> print headline.value496 >>> print(headline.value)
497 Apache announcement headline497 Apache announcement headline
498 >>> headline.value = 'Modified headline'498 >>> headline.value = 'Modified headline'
499 >>> summary = priv_browser.getControl('Summary')499 >>> summary = priv_browser.getControl('Summary')
500 >>> print summary.value500 >>> print(summary.value)
501 Apache announcement summary501 Apache announcement summary
502 >>> summary.value = 'Modified summary'502 >>> summary.value = 'Modified summary'
503 >>> url = priv_browser.getControl('URL')503 >>> url = priv_browser.getControl('URL')
504 >>> print url.value504 >>> print(url.value)
505 http://apache.org/announcement/rocking/505 http://apache.org/announcement/rocking/
506 >>> url.value = (506 >>> url.value = (
507 ... 'http://apache.org/modified/url/')507 ... 'http://apache.org/modified/url/')
508 >>> priv_browser.getControl('Modify').click()508 >>> priv_browser.getControl('Modify').click()
509 >>> print priv_browser.title509 >>> print(priv_browser.title)
510 News and announcements...510 News and announcements...
511 >>> priv_browser.open('http://launchpad.test/tomcat/+announcements')511 >>> priv_browser.open('http://launchpad.test/tomcat/+announcements')
512 >>> 'Modified headline' in announcements(priv_browser.contents)512 >>> 'Modified headline' in announcements(priv_browser.contents)
513 True513 True
514 >>> 'Modified summary' in announcements(priv_browser.contents)514 >>> 'Modified summary' in announcements(priv_browser.contents)
515 True515 True
516 >>> print priv_browser.getLink('Read more').url516 >>> print(priv_browser.getLink('Read more').url)
517 http://apache.org/modified/url/517 http://apache.org/modified/url/
518518
519519
@@ -530,14 +530,14 @@ You can retract an announcement which was previously announced.
530 >>> priv_browser.getLink('Kubuntu announcement headline').click()530 >>> priv_browser.getLink('Kubuntu announcement headline').click()
531 >>> priv_browser.getLink('Delete announcement').click()531 >>> priv_browser.getLink('Delete announcement').click()
532 >>> priv_browser.getLink('retracting the announcement').click()532 >>> priv_browser.getLink('retracting the announcement').click()
533 >>> print priv_browser.title533 >>> print(priv_browser.title)
534 Retract announcement : Kubuntu announcement headline : Kubuntu534 Retract announcement : Kubuntu announcement headline : Kubuntu
535535
536Actually clicking "Retract" takes us back to the listing page. The item536Actually clicking "Retract" takes us back to the listing page. The item
537is shown as having been retracted if you are a privileged user.537is shown as having been retracted if you are a privileged user.
538538
539 >>> priv_browser.getControl('Retract').click()539 >>> priv_browser.getControl('Retract').click()
540 >>> print priv_browser.title540 >>> print(priv_browser.title)
541 News and announcements...541 News and announcements...
542 >>> 'Kubuntu announcement ' in announcements(priv_browser.contents)542 >>> 'Kubuntu announcement ' in announcements(priv_browser.contents)
543 True543 True
@@ -562,14 +562,14 @@ Once something has been retracted, it can be published again.
562562
563 >>> priv_browser.getLink('Kubuntu announcement headline').click()563 >>> priv_browser.getLink('Kubuntu announcement headline').click()
564 >>> priv_browser.getLink('Publish announcement').click()564 >>> priv_browser.getLink('Publish announcement').click()
565 >>> print priv_browser.title565 >>> print(priv_browser.title)
566 Publish announcement : Kubuntu announcement headline : Kubuntu566 Publish announcement : Kubuntu announcement headline : Kubuntu
567 >>> radio = priv_browser.getControl(name="field.publication_date.action")567 >>> radio = priv_browser.getControl(name="field.publication_date.action")
568 >>> radio.value = ['immediately']568 >>> radio.value = ['immediately']
569 >>> priv_browser.getControl(569 >>> priv_browser.getControl(
570 ... name="field.publication_date.announcement_date").value = ''570 ... name="field.publication_date.announcement_date").value = ''
571 >>> priv_browser.getControl('Publish').click()571 >>> priv_browser.getControl('Publish').click()
572 >>> print priv_browser.title572 >>> print(priv_browser.title)
573 News and announcements...573 News and announcements...
574574
575And once again it is visible to unprivileged users:575And once again it is visible to unprivileged users:
@@ -591,11 +591,11 @@ it.
591 >>> priv_browser.open('http://launchpad.test/kubuntu/+announcements')591 >>> priv_browser.open('http://launchpad.test/kubuntu/+announcements')
592 >>> priv_browser.getLink('Kubuntu announcement headline').click()592 >>> priv_browser.getLink('Kubuntu announcement headline').click()
593 >>> priv_browser.getLink('Move announcement').click()593 >>> priv_browser.getLink('Move announcement').click()
594 >>> print priv_browser.title594 >>> print(priv_browser.title)
595 Move announcement : Kubuntu announcement headline : Kubuntu595 Move announcement : Kubuntu announcement headline : Kubuntu
596 >>> priv_browser.getControl('For').value = 'guadalinex'596 >>> priv_browser.getControl('For').value = 'guadalinex'
597 >>> priv_browser.getControl('Retarget').click()597 >>> priv_browser.getControl('Retarget').click()
598 >>> print priv_browser.title598 >>> print(priv_browser.title)
599 News and announcements...599 News and announcements...
600 >>> 'Kubuntu announcement' in announcements(priv_browser.contents)600 >>> 'Kubuntu announcement' in announcements(priv_browser.contents)
601 True601 True
@@ -608,14 +608,14 @@ not be able to move it.
608 >>> kamion_browser.open('http://launchpad.test/guadalinex/+announcements')608 >>> kamion_browser.open('http://launchpad.test/guadalinex/+announcements')
609 >>> kamion_browser.getLink('Kubuntu announcement headline').click()609 >>> kamion_browser.getLink('Kubuntu announcement headline').click()
610 >>> kamion_browser.getLink('Move announcement').click()610 >>> kamion_browser.getLink('Move announcement').click()
611 >>> print kamion_browser.title611 >>> print(kamion_browser.title)
612 Move announcement : Kubuntu announcement headline : GuadaLinex612 Move announcement : Kubuntu announcement headline : GuadaLinex
613 >>> kamion_browser.getControl('For').value = 'kubuntu'613 >>> kamion_browser.getControl('For').value = 'kubuntu'
614 >>> kamion_browser.getControl('Retarget').click()614 >>> kamion_browser.getControl('Retarget').click()
615 >>> "don't have permission" in extract_text(615 >>> "don't have permission" in extract_text(
616 ... find_main_content(kamion_browser.contents))616 ... find_main_content(kamion_browser.contents))
617 True617 True
618 >>> print kamion_browser.title618 >>> print(kamion_browser.title)
619 Move announcement : Kubuntu announcement headline : GuadaLinex619 Move announcement : Kubuntu announcement headline : GuadaLinex
620620
621621
@@ -642,11 +642,11 @@ domain.
642 >>> strainer = SoupStrainer('link', rel='self')642 >>> strainer = SoupStrainer('link', rel='self')
643 >>> links = parse_links(nopriv_browser.contents, rel='self')643 >>> links = parse_links(nopriv_browser.contents, rel='self')
644 >>> for link in links:644 >>> for link in links:
645 ... print link645 ... print(link)
646 <link href="http://feeds.launchpad.test/netapplet/announcements.atom" rel="self"/>646 <link href="http://feeds.launchpad.test/netapplet/announcements.atom" rel="self"/>
647647
648 >>> for id_ in parse_ids(nopriv_browser.contents):648 >>> for id_ in parse_ids(nopriv_browser.contents):
649 ... print extract_text(id_)649 ... print(extract_text(id_))
650 tag:launchpad.net,2005-03-10:/netapplet/+announcements650 tag:launchpad.net,2005-03-10:/netapplet/+announcements
651651
652The feeds include only published announcements. The Jokosher652The feeds include only published announcements. The Jokosher
@@ -672,7 +672,7 @@ Retracted items do not show up either.
672 >>> 'Kubuntu announcement headline' in nopriv_browser.contents672 >>> 'Kubuntu announcement headline' in nopriv_browser.contents
673 True673 True
674 >>> for id_ in parse_ids(nopriv_browser.contents):674 >>> for id_ in parse_ids(nopriv_browser.contents):
675 ... print extract_text(id_)675 ... print(extract_text(id_))
676 tag:launchpad.net,2006-10-16:/guadalinex/+announcements676 tag:launchpad.net,2006-10-16:/guadalinex/+announcements
677 tag:launchpad.net,...:/+announcement/...677 tag:launchpad.net,...:/+announcement/...
678678
@@ -683,7 +683,7 @@ Retracted items do not show up either.
683 >>> priv_browser.getLink('Kubuntu announcement headline').click()683 >>> priv_browser.getLink('Kubuntu announcement headline').click()
684 >>> priv_browser.getLink('Delete announcement').click()684 >>> priv_browser.getLink('Delete announcement').click()
685 >>> priv_browser.getLink('retracting the announcement').click()685 >>> priv_browser.getLink('retracting the announcement').click()
686 >>> print priv_browser.title686 >>> print(priv_browser.title)
687 Retract announcement : Kubuntu announcement headline : GuadaLinex687 Retract announcement : Kubuntu announcement headline : GuadaLinex
688 >>> priv_browser.getControl('Retract').click()688 >>> priv_browser.getControl('Retract').click()
689 >>> nopriv_browser.reload()689 >>> nopriv_browser.reload()
@@ -706,7 +706,7 @@ products.
706 >>> 'Derby announcement headline' in nopriv_browser.contents706 >>> 'Derby announcement headline' in nopriv_browser.contents
707 True707 True
708 >>> for id_ in parse_ids(nopriv_browser.contents):708 >>> for id_ in parse_ids(nopriv_browser.contents):
709 ... print extract_text(id_)709 ... print(extract_text(id_))
710 tag:launchpad.net,2004-09-24:/apache/+announcements710 tag:launchpad.net,2004-09-24:/apache/+announcements
711 tag:launchpad.net,...:/+announcement/...711 tag:launchpad.net,...:/+announcement/...
712 tag:launchpad.net,...:/+announcement/...712 tag:launchpad.net,...:/+announcement/...
@@ -715,7 +715,7 @@ products.
715 >>> strainer = SoupStrainer('link', rel='self')715 >>> strainer = SoupStrainer('link', rel='self')
716 >>> links = parse_links(nopriv_browser.contents, rel='self')716 >>> links = parse_links(nopriv_browser.contents, rel='self')
717 >>> for link in links:717 >>> for link in links:
718 ... print link718 ... print(link)
719 <link href="http://feeds.launchpad.test/apache/announcements.atom" rel="self"/>719 <link href="http://feeds.launchpad.test/apache/announcements.atom" rel="self"/>
720720
721Finally, there is a feed for all announcements across all projects721Finally, there is a feed for all announcements across all projects
@@ -781,10 +781,10 @@ An owner can permanently delete an announcement.
781 False781 False
782 >>> kamion_browser.getLink('Kubuntu announcement headline').click()782 >>> kamion_browser.getLink('Kubuntu announcement headline').click()
783 >>> kamion_browser.getLink('Delete announcement').click()783 >>> kamion_browser.getLink('Delete announcement').click()
784 >>> print kamion_browser.title784 >>> print(kamion_browser.title)
785 Delete announcement : Kubuntu announcement headline : GuadaLinex785 Delete announcement : Kubuntu announcement headline : GuadaLinex
786 >>> kamion_browser.getControl('Delete').click()786 >>> kamion_browser.getControl('Delete').click()
787 >>> print priv_browser.title787 >>> print(priv_browser.title)
788 News and announcements...788 News and announcements...
789 >>> no_announcements(kamion_browser.contents)789 >>> no_announcements(kamion_browser.contents)
790 True790 True
diff --git a/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt b/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt
index 07a4613..f8dc2c9 100644
--- a/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt
+++ b/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt
@@ -33,23 +33,23 @@ The distribution's registrant can access the page and change the usage.
33 >>> registrant = setupBrowser(33 >>> registrant = setupBrowser(
34 ... auth='Basic celso.providelo@canonical.com:test')34 ... auth='Basic celso.providelo@canonical.com:test')
35 >>> registrant.open('http://launchpad.test/ubuntu/+edit')35 >>> registrant.open('http://launchpad.test/ubuntu/+edit')
36 >>> print registrant.url36 >>> print(registrant.url)
37 http://launchpad.test/ubuntu/+edit37 http://launchpad.test/ubuntu/+edit
3838
39 >>> print registrant.getControl(name='field.translations_usage').value[0]39 >>> print(registrant.getControl(name='field.translations_usage').value[0])
40 LAUNCHPAD40 LAUNCHPAD
41 >>> print registrant.getControl(name='field.official_malone').value41 >>> print(registrant.getControl(name='field.official_malone').value)
42 True42 True
43 >>> print registrant.getControl(name='field.enable_bug_expiration').value43 >>> print(registrant.getControl(name='field.enable_bug_expiration').value)
44 True44 True
45 >>> print registrant.getControl(name='field.blueprints_usage').value[0]45 >>> print(registrant.getControl(name='field.blueprints_usage').value[0])
46 LAUNCHPAD46 LAUNCHPAD
47 >>> print registrant.getControl(name='field.answers_usage').value[0]47 >>> print(registrant.getControl(name='field.answers_usage').value[0])
48 LAUNCHPAD48 LAUNCHPAD
49 >>> print bool(49 >>> print(bool(
50 ... registrant.getControl(name='field.require_virtualized').value)50 ... registrant.getControl(name='field.require_virtualized').value))
51 False51 False
52 >>> print registrant.getControl(name='field.processors').value52 >>> print(registrant.getControl(name='field.processors').value)
53 ['386', 'amd64', 'hppa']53 ['386', 'amd64', 'hppa']
5454
55 >>> registrant.getControl(name='field.translations_usage').value = [55 >>> registrant.getControl(name='field.translations_usage').value = [
@@ -60,19 +60,19 @@ Just like Launchpad administrators can.
6060
61 >>> admin_browser.open('http://launchpad.test/ubuntu')61 >>> admin_browser.open('http://launchpad.test/ubuntu')
62 >>> admin_browser.getLink('Change details').click()62 >>> admin_browser.getLink('Change details').click()
63 >>> print admin_browser.title63 >>> print(admin_browser.title)
64 Change Ubuntu details...64 Change Ubuntu details...
65 >>> print admin_browser.getControl(65 >>> print(admin_browser.getControl(
66 ... name='field.translations_usage').value[0]66 ... name='field.translations_usage').value[0])
67 UNKNOWN67 UNKNOWN
68 >>> print admin_browser.getControl(name='field.official_malone').value68 >>> print(admin_browser.getControl(name='field.official_malone').value)
69 True69 True
70 >>> print admin_browser.getControl(70 >>> print(admin_browser.getControl(
71 ... name='field.enable_bug_expiration').value71 ... name='field.enable_bug_expiration').value)
72 True72 True
73 >>> print admin_browser.getControl(name='field.blueprints_usage').value[0]73 >>> print(admin_browser.getControl(name='field.blueprints_usage').value[0])
74 LAUNCHPAD74 LAUNCHPAD
75 >>> print admin_browser.getControl(name='field.answers_usage').value[0]75 >>> print(admin_browser.getControl(name='field.answers_usage').value[0])
76 LAUNCHPAD76 LAUNCHPAD
7777
78 >>> admin_browser.getControl(78 >>> admin_browser.getControl(
@@ -84,13 +84,13 @@ Just like Launchpad administrators can.
84 ... name='field.answers_usage').value = ['UNKNOWN']84 ... name='field.answers_usage').value = ['UNKNOWN']
85 >>> admin_browser.getControl('Change', index=3).click()85 >>> admin_browser.getControl('Change', index=3).click()
8686
87 >>> print admin_browser.url87 >>> print(admin_browser.url)
88 http://launchpad.test/ubuntu88 http://launchpad.test/ubuntu
8989
90Only administators can configure the publisher for the distribution:90Only administators can configure the publisher for the distribution:
9191
92 >>> admin_browser.getLink('Configure publisher').click()92 >>> admin_browser.getLink('Configure publisher').click()
93 >>> print admin_browser.title93 >>> print(admin_browser.title)
94 Publisher configuration for...94 Publisher configuration for...
9595
96 >>> admin_browser.getControl(96 >>> admin_browser.getControl(
@@ -101,7 +101,7 @@ Only administators can configure the publisher for the distribution:
101 ... name='field.copy_base_url').value = "http://copy.base.url/"101 ... name='field.copy_base_url').value = "http://copy.base.url/"
102 >>> admin_browser.getControl('Save').click()102 >>> admin_browser.getControl('Save').click()
103103
104 >>> print admin_browser.url104 >>> print(admin_browser.url)
105 http://launchpad.test/ubuntu105 http://launchpad.test/ubuntu
106106
107107
@@ -130,11 +130,11 @@ do not change the expiration check box, and they do the whole
130operation before the page complete loading.130operation before the page complete loading.
131131
132 >>> admin_browser.getLink('Change details').click()132 >>> admin_browser.getLink('Change details').click()
133 >>> print admin_browser.getControl(name='field.official_malone').value133 >>> print(admin_browser.getControl(name='field.official_malone').value)
134 True134 True
135135
136 >>> print admin_browser.getControl(136 >>> print(admin_browser.getControl(
137 ... name='field.enable_bug_expiration').value137 ... name='field.enable_bug_expiration').value)
138 True138 True
139139
140 >>> admin_browser.getControl(name='field.official_malone').value = False140 >>> admin_browser.getControl(name='field.official_malone').value = False
diff --git a/lib/lp/registry/stories/distribution/xx-distribution-overview.txt b/lib/lp/registry/stories/distribution/xx-distribution-overview.txt
index cc5ddcf..cb14899 100644
--- a/lib/lp/registry/stories/distribution/xx-distribution-overview.txt
+++ b/lib/lp/registry/stories/distribution/xx-distribution-overview.txt
@@ -14,7 +14,7 @@ Distribution listings
14There is a listing of all distributions at /distros/:14There is a listing of all distributions at /distros/:
1515
16 >>> anon_browser.open('http://launchpad.test/distros/')16 >>> anon_browser.open('http://launchpad.test/distros/')
17 >>> print anon_browser.title17 >>> print(anon_browser.title)
18 Distributions registered in Launchpad18 Distributions registered in Launchpad
1919
2020
@@ -28,7 +28,7 @@ series.
28Some distributions have listings of major versions, for example Debian:28Some distributions have listings of major versions, for example Debian:
2929
30 >>> anon_browser.open('http://launchpad.test/debian')30 >>> anon_browser.open('http://launchpad.test/debian')
31 >>> print extract_text(find_tag_by_id(anon_browser.contents, 'sandm'))31 >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'sandm')))
32 Active series and milestones32 Active series and milestones
33 3.1 ā€œSargeā€ series - frozen33 3.1 ā€œSargeā€ series - frozen
34 3.0 ā€œWoodyā€ series - current34 3.0 ā€œWoodyā€ series - current
@@ -44,7 +44,7 @@ rules.
44 >>> admin_browser.getControl("Register Milestone").click()44 >>> admin_browser.getControl("Register Milestone").click()
4545
46 >>> anon_browser.open('http://launchpad.test/debian')46 >>> anon_browser.open('http://launchpad.test/debian')
47 >>> print extract_text(find_tag_by_id(anon_browser.contents, 'sandm'))47 >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'sandm')))
48 Active series and milestones48 Active series and milestones
49 ...49 ...
50 Milestones: testmilestone, 3.1, and 3.1-rc150 Milestones: testmilestone, 3.1, and 3.1-rc1
@@ -77,15 +77,15 @@ to the distribution series and milestones pages respectively.
77Others do not have any series so the portlet is not shown.77Others do not have any series so the portlet is not shown.
7878
79 >>> anon_browser.open('http://launchpad.test/gentoo')79 >>> anon_browser.open('http://launchpad.test/gentoo')
80 >>> print find_tag_by_id(anon_browser.contents, 'sandm')80 >>> print(find_tag_by_id(anon_browser.contents, 'sandm'))
81 None81 None
8282
83The 5 latest derivatives are displayed on the home page83The 5 latest derivatives are displayed on the home page
84along with a link to list all of them.84along with a link to list all of them.
8585
86 >>> anon_browser.open('http://launchpad.test/ubuntu')86 >>> anon_browser.open('http://launchpad.test/ubuntu')
87 >>> print extract_text(87 >>> print(extract_text(
88 ... find_tag_by_id(anon_browser.contents, 'derivatives'))88 ... find_tag_by_id(anon_browser.contents, 'derivatives')))
89 Latest derivatives89 Latest derivatives
90 9.9.990 9.9.9
91 ā€œHoary Mockā€ series91 ā€œHoary Mockā€ series
@@ -111,8 +111,8 @@ If there are no derivatives, the link to the derivatives page is
111not there.111not there.
112112
113 >>> anon_browser.open('http://launchpad.test/ubuntutest')113 >>> anon_browser.open('http://launchpad.test/ubuntutest')
114 >>> print extract_text(114 >>> print(extract_text(
115 ... find_tag_by_id(anon_browser.contents, 'derivatives'))115 ... find_tag_by_id(anon_browser.contents, 'derivatives')))
116 Latest derivatives116 Latest derivatives
117 No derivatives.117 No derivatives.
118118
@@ -132,10 +132,10 @@ If there is a development series alias, it becomes a redirect.
132 ... ubuntu = getUtility(IDistributionSet).getByName(u"ubuntu")132 ... ubuntu = getUtility(IDistributionSet).getByName(u"ubuntu")
133 ... ubuntu.development_series_alias = "devel"133 ... ubuntu.development_series_alias = "devel"
134 >>> anon_browser.open("http://launchpad.test/ubuntu/devel")134 >>> anon_browser.open("http://launchpad.test/ubuntu/devel")
135 >>> print anon_browser.url135 >>> print(anon_browser.url)
136 http://launchpad.test/ubuntu/hoary136 http://launchpad.test/ubuntu/hoary
137 >>> anon_browser.open("http://launchpad.test/ubuntu/devel/+builds")137 >>> anon_browser.open("http://launchpad.test/ubuntu/devel/+builds")
138 >>> print anon_browser.url138 >>> print(anon_browser.url)
139 http://launchpad.test/ubuntu/hoary/+builds139 http://launchpad.test/ubuntu/hoary/+builds
140140
141141
@@ -146,13 +146,13 @@ The distroseries pages presents the registration information.
146146
147 >>> anon_browser.open('http://launchpad.test/ubuntu')147 >>> anon_browser.open('http://launchpad.test/ubuntu')
148148
149 >>> print extract_text(149 >>> print(extract_text(
150 ... find_tag_by_id(anon_browser.contents, 'registration'))150 ... find_tag_by_id(anon_browser.contents, 'registration')))
151 Registered by151 Registered by
152 Registry Administrators152 Registry Administrators
153 on 2006-10-16153 on 2006-10-16
154154
155 >>> print anon_browser.getLink('Ubuntu Team').url155 >>> print(anon_browser.getLink('Ubuntu Team').url)
156 http://launchpad.test/~ubuntu-team156 http://launchpad.test/~ubuntu-team
157157
158158
@@ -164,11 +164,11 @@ Displaying the page for that URL is nonsensical (it looks like the PPA
164index page), so the view redirect it to the distribution index page.164index page), so the view redirect it to the distribution index page.
165165
166 >>> anon_browser.open("http://launchpad.test/ubuntu/+archive/primary")166 >>> anon_browser.open("http://launchpad.test/ubuntu/+archive/primary")
167 >>> print anon_browser.url167 >>> print(anon_browser.url)
168 http://launchpad.test/ubuntu168 http://launchpad.test/ubuntu
169169
170 >>> anon_browser.open("http://launchpad.test/ubuntu/+archive/partner")170 >>> anon_browser.open("http://launchpad.test/ubuntu/+archive/partner")
171 >>> print anon_browser.url171 >>> print(anon_browser.url)
172 http://launchpad.test/ubuntu172 http://launchpad.test/ubuntu
173173
174Any attempt to access an incomplete URL (missing the archive name174Any attempt to access an incomplete URL (missing the archive name
diff --git a/lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt b/lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt
index eea6781..b81fa99 100644
--- a/lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt
+++ b/lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt
@@ -11,15 +11,15 @@ archive mirrors, plus the canonical one.
1111
12 >>> browser.addHeader('X_FORWARDED_FOR', '83.196.46.77')12 >>> browser.addHeader('X_FORWARDED_FOR', '83.196.46.77')
13 >>> browser.open('http://launchpad.test/ubuntu/+countrymirrors-archive')13 >>> browser.open('http://launchpad.test/ubuntu/+countrymirrors-archive')
14 >>> print browser.headers['content-type']14 >>> print(browser.headers['content-type'])
15 text/plain;charset=utf-815 text/plain;charset=utf-8
16 >>> print browser.headers['X-Generated-For-Country']16 >>> print(browser.headers['X-Generated-For-Country'])
17 France17 France
18 >>> print browser.headers['X-Generated-For-IP']18 >>> print(browser.headers['X-Generated-For-IP'])
19 83.196.46.7719 83.196.46.77
20 >>> print browser.headers['X-REQUEST-HTTP_X_FORWARDED_FOR']20 >>> print(browser.headers['X-REQUEST-HTTP_X_FORWARDED_FOR'])
21 83.196.46.7721 83.196.46.77
22 >>> print browser.headers['X-REQUEST-REMOTE_ADDR']22 >>> print(browser.headers['X-REQUEST-REMOTE_ADDR'])
23 127.0.0.123 127.0.0.1
24 >>> for url in sorted(browser.contents.split('\n')):24 >>> for url in sorted(browser.contents.split('\n')):
25 ... print(url)25 ... print(url)
@@ -32,7 +32,7 @@ canonical mirror.
3232
33 >>> anon_browser.open(33 >>> anon_browser.open(
34 ... 'http://launchpad.test/ubuntu/+countrymirrors-archive')34 ... 'http://launchpad.test/ubuntu/+countrymirrors-archive')
35 >>> print anon_browser.headers['X-Generated-For-Country']35 >>> print(anon_browser.headers['X-Generated-For-Country'])
36 Unknown36 Unknown
37 >>> for url in sorted(anon_browser.contents.split('\n')):37 >>> for url in sorted(anon_browser.contents.split('\n')):
38 ... print(url)38 ... print(url)
diff --git a/lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt b/lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt
index 19885a6..c694d2b 100644
--- a/lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt
+++ b/lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt
@@ -13,7 +13,7 @@ on their status and content.
13 ... mirrors = []13 ... mirrors = []
14 ... for tr in header.findNextSiblings('tr'):14 ... for tr in header.findNextSiblings('tr'):
15 ... if 'head' in str(tr.attrs):15 ... if 'head' in str(tr.attrs):
16 ... print "%s: %s" % (country, mirrors)16 ... print("%s: %s" % (country, mirrors))
17 ... country = extract_text(tr.find('th'))17 ... country = extract_text(tr.find('th'))
18 ... if country == 'Total':18 ... if country == 'Total':
19 ... break19 ... break
@@ -39,7 +39,7 @@ The archive mirrors display the "freshness", how far behind they are.
3939
40 >>> browser.open('http://launchpad.test/ubuntu')40 >>> browser.open('http://launchpad.test/ubuntu')
41 >>> browser.getLink('Archive mirrors').click()41 >>> browser.getLink('Archive mirrors').click()
42 >>> print browser.title42 >>> print(browser.title)
43 Mirrors :...43 Mirrors :...
44 >>> print_mirrors_by_countries(browser.contents)44 >>> print_mirrors_by_countries(browser.contents)
45 Antarctica:45 Antarctica:
@@ -89,7 +89,7 @@ seen by distro owners, mirror admins of the distro or launchpad admins.
89 >>> browser.url89 >>> browser.url
90 'http://launchpad.test/ubuntu/+disabledmirrors'90 'http://launchpad.test/ubuntu/+disabledmirrors'
9191
92 >>> print find_tag_by_id(browser.contents, 'maincontent').renderContents()92 >>> print(find_tag_by_id(browser.contents, 'maincontent').renderContents())
93 <BLANKLINE>93 <BLANKLINE>
94 ...We don't know of any Disabled Mirrors for this distribution...94 ...We don't know of any Disabled Mirrors for this distribution...
9595
diff --git a/lib/lp/registry/stories/distroseries/distroseries-admin.txt b/lib/lp/registry/stories/distroseries/distroseries-admin.txt
index 1edd1b1..33303f5 100644
--- a/lib/lp/registry/stories/distroseries/distroseries-admin.txt
+++ b/lib/lp/registry/stories/distroseries/distroseries-admin.txt
@@ -8,29 +8,29 @@ Launchpad 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/hoary')
11 >>> print admin_browser.title11 >>> 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.url14 >>> print(admin_browser.url)
15 http://launchpad.test/ubuntu/hoary/+edit15 http://launchpad.test/ubuntu/hoary/+edit
1616
17 >>> print admin_browser.title17 >>> print(admin_browser.title)
18 Edit The Hoary Hedgehog Release...18 Edit The Hoary Hedgehog Release...
1919
20 >>> admin_browser.getControl(20 >>> admin_browser.getControl(
21 ... 'Display name', index=0).value = 'Happy'21 ... 'Display name', index=0).value = 'Happy'
22 >>> admin_browser.getControl('Change').click()22 >>> admin_browser.getControl('Change').click()
23 >>> print admin_browser.title23 >>> print(admin_browser.title)
24 Happy (5.04)...24 Happy (5.04)...
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/hoary')
29 >>> admin_browser.getLink('Administer').click()29 >>> admin_browser.getLink('Administer').click()
30 >>> print admin_browser.url30 >>> print(admin_browser.url)
31 http://launchpad.test/ubuntu/hoary/+admin31 http://launchpad.test/ubuntu/hoary/+admin
3232
33 >>> print admin_browser.title33 >>> print(admin_browser.title)
34 Administer The Hoary Hedgehog Release...34 Administer The Hoary Hedgehog Release...
3535
36 >>> admin_browser.getControl(36 >>> admin_browser.getControl(
@@ -38,9 +38,9 @@ A separate administration page is available via the 'Administer' link.
38 >>> admin_browser.getControl(38 >>> admin_browser.getControl(
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.url41 >>> print(admin_browser.url)
42 http://launchpad.test/ubuntu/happy42 http://launchpad.test/ubuntu/happy
43 >>> print admin_browser.title43 >>> print(admin_browser.title)
44 Happy (5.05)...44 Happy (5.05)...
4545
4646
@@ -71,10 +71,10 @@ Registry experts do have access to the administration page.
7171
72 >>> registry_browser.open('http://launchpad.test/ubuntu/happy')72 >>> registry_browser.open('http://launchpad.test/ubuntu/happy')
73 >>> registry_browser.getLink('Administer').click()73 >>> registry_browser.getLink('Administer').click()
74 >>> print registry_browser.url74 >>> print(registry_browser.url)
75 http://launchpad.test/ubuntu/happy/+admin75 http://launchpad.test/ubuntu/happy/+admin
7676
77 >>> print registry_browser.title77 >>> print(registry_browser.title)
78 Administer The Hoary Hedgehog Release...78 Administer The Hoary Hedgehog Release...
7979
80 >>> registry_browser.getControl(80 >>> registry_browser.getControl(
@@ -82,7 +82,7 @@ Registry experts do have access to the administration page.
82 >>> registry_browser.getControl(82 >>> registry_browser.getControl(
83 ... 'Version', index=0).value = '5.04'83 ... 'Version', index=0).value = '5.04'
84 >>> registry_browser.getControl('Change').click()84 >>> registry_browser.getControl('Change').click()
85 >>> print registry_browser.url85 >>> print(registry_browser.url)
86 http://launchpad.test/ubuntu/hoary86 http://launchpad.test/ubuntu/hoary
87 >>> print registry_browser.title87 >>> print(registry_browser.title)
88 Happy (5.04)...88 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 9be9c1e..f5eaa6f 100644
--- a/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt
+++ b/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt
@@ -6,7 +6,7 @@ this distribution series.
66
7 >>> user_browser.open('http://launchpad.test/ubuntu/hoary')7 >>> user_browser.open('http://launchpad.test/ubuntu/hoary')
8 >>> user_browser.getLink('Help translate').click()8 >>> user_browser.getLink('Help translate').click()
9 >>> print user_browser.title9 >>> print(user_browser.title)
10 Hoary (5.04) : Translations : Ubuntu10 Hoary (5.04) : Translations : Ubuntu
1111
1212
@@ -18,17 +18,17 @@ its main 'heading'.
1818
19 >>> anon_browser.open('http://launchpad.test/ubuntu/warty')19 >>> anon_browser.open('http://launchpad.test/ubuntu/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')))
23 Registered by23 Registered by
24 Ubuntu Team on24 Ubuntu Team on
25 2006-10-1625 2006-10-16
2626
27 >>> print extract_text(find_main_content(anon_browser.contents))27 >>> print(extract_text(find_main_content(anon_browser.contents)))
28 Warty28 Warty
29 ...29 ...
3030
31 >>> print anon_browser.getLink('Ubuntu Team').url31 >>> print(anon_browser.getLink('Ubuntu Team').url)
32 http://launchpad.test/~ubuntu-team32 http://launchpad.test/~ubuntu-team
3333
3434
@@ -38,8 +38,8 @@ Details portlet
38The distroseries page contains a details portlet giving more information38The distroseries page contains a details portlet giving more information
39on the series' details.39on the series' details.
4040
41 >>> print extract_text(41 >>> print(extract_text(
42 ... find_portlet(anon_browser.contents, 'Series information'))42 ... find_portlet(anon_browser.contents, 'Series information')))
43 Series information43 Series information
44 Distribution: Ubuntu44 Distribution: Ubuntu
45 Series: Warty (4.10)45 Series: Warty (4.10)
@@ -55,8 +55,8 @@ On 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/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
61 Distribution: Debian61 Distribution: Debian
62 Series: Sarge (3.1)62 Series: Sarge (3.1)
@@ -94,8 +94,8 @@ the series derived from this series:
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/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
100 Distribution: Debian100 Distribution: Debian
101 Series: Sarge (3.1)101 Series: Sarge (3.1)
@@ -116,10 +116,10 @@ series, we can create structural bug subscriptions.
116116
117 >>> admin_browser.open('http://launchpad.test/ubuntu/warty')117 >>> admin_browser.open('http://launchpad.test/ubuntu/warty')
118 >>> admin_browser.getLink('Subscribe to bug mail').click()118 >>> admin_browser.getLink('Subscribe to bug mail').click()
119 >>> print admin_browser.url119 >>> print(admin_browser.url)
120 http://launchpad.test/ubuntu/warty/+subscribe120 http://launchpad.test/ubuntu/warty/+subscribe
121121
122 >>> print admin_browser.title122 >>> print(admin_browser.title)
123 Subscribe : Warty (4.10) : Bugs : Ubuntu123 Subscribe : Warty (4.10) : Bugs : Ubuntu
124124
125125
@@ -132,8 +132,8 @@ upstream packaging.
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/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
138 5 source packages are linked to registered upstream projects.138 5 source packages are linked to registered upstream projects.
139 3 need linking.139 3 need linking.
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 f557d62..2ac0e42 100644
--- a/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt
+++ b/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt
@@ -6,14 +6,14 @@ series +index page.
66
7 >>> anon_browser.open('http://launchpad.test/ubuntu/hoary')7 >>> anon_browser.open('http://launchpad.test/ubuntu/hoary')
8 >>> anon_browser.getLink('All upstream links').click()8 >>> anon_browser.getLink('All upstream links').click()
9 >>> print anon_browser.title9 >>> print(anon_browser.title)
10 All upstream links : ...10 All upstream links : ...
1111
12The page lists the upstream packaging links.12The page lists the upstream packaging links.
1313
14 >>> content = find_main_content(anon_browser.contents)14 >>> content = find_main_content(anon_browser.contents)
15 >>> print extract_text(15 >>> print(extract_text(
16 ... find_tag_by_id(anon_browser.contents, 'packagings'))16 ... find_tag_by_id(anon_browser.contents, 'packagings')))
17 Source Package Upstream Project Upstream Contributor Connections17 Source Package Upstream Project Upstream Contributor Connections
18 netapplet18 netapplet
19 NetApplet The Novell Network Applet19 NetApplet The Novell Network Applet
@@ -30,7 +30,7 @@ The page lists the upstream packaging links.
30Any use can see that this page is related to the needs packaging report. It30Any use can see that this page is related to the needs packaging report. It
31is linked, but the link to this page is not enabled.31is linked, but the link to this page is not enabled.
3232
33 >>> print extract_text(find_tag_by_id(content, 'related-pages'))33 >>> print(extract_text(find_tag_by_id(content, 'related-pages')))
34 Needs upstream links All upstream links34 Needs upstream links All upstream links
3535
36 >>> anon_browser.getLink('Needs upstream links')36 >>> anon_browser.getLink('Needs upstream links')
@@ -47,14 +47,14 @@ links 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/hoary/+packaging?start=0&batch=1')
50 >>> print extract_text(find_tag_by_id(50 >>> print(extract_text(find_tag_by_id(
51 ... anon_browser.contents, 'packagings'))51 ... anon_browser.contents, 'packagings')))
52 Source Package Upstream Project Upstream Contributor Connections52 Source Package Upstream Project Upstream Contributor Connections
53 netapplet ...53 netapplet ...
5454
55 >>> anon_browser.getLink('Next', index=0).click()55 >>> anon_browser.getLink('Next', index=0).click()
56 >>> print extract_text(56 >>> print(extract_text(
57 ... find_tag_by_id(anon_browser.contents, 'packagings'))57 ... find_tag_by_id(anon_browser.contents, 'packagings')))
58 Source Package Upstream Project Upstream Contributor Connections58 Source Package Upstream Project Upstream Contributor Connections
59 evolution ...59 evolution ...
6060
@@ -77,11 +77,11 @@ packages with the greatest need are listed first.
7777
78 >>> anon_browser.open('http://launchpad.test/ubuntu/hoary')78 >>> anon_browser.open('http://launchpad.test/ubuntu/hoary')
79 >>> anon_browser.getLink('Needs upstream links').click()79 >>> anon_browser.getLink('Needs upstream links').click()
80 >>> print anon_browser.title80 >>> print(anon_browser.title)
81 Needs upstream links : ...81 Needs upstream links : ...
8282
83 >>> content = find_main_content(anon_browser.contents)83 >>> content = find_main_content(anon_browser.contents)
84 >>> print extract_text(find_tag_by_id(content, 'packages'))84 >>> print(extract_text(find_tag_by_id(content, 'packages')))
85 Source Package Bugs Translations85 Source Package Bugs Translations
86 pmount No bugs 64 strings86 pmount No bugs 64 strings
87 linux-source-2.6.15 1 bug No strings87 linux-source-2.6.15 1 bug No strings
@@ -103,13 +103,13 @@ pages.
103103
104The listing is batched so that the user can visit the next page listings.104The listing is batched so that the user can visit the next page listings.
105105
106 >>> print extract_text(find_tag_by_id(content, 'listing-navigation'))106 >>> print(extract_text(find_tag_by_id(content, 'listing-navigation')))
107 1 ... 5 of 5 packages First ... Previous ... Next ... Last107 1 ... 5 of 5 packages First ... Previous ... Next ... Last
108108
109Any use can see that this page is related to the packaging report. It is109Any use can see that this page is related to the packaging report. It is
110linked, but the link to this page is not enabled.110linked, but the link to this page is not enabled.
111111
112 >>> print extract_text(find_tag_by_id(content, 'related-pages'))112 >>> print(extract_text(find_tag_by_id(content, 'related-pages')))
113 Needs upstream links All upstream links113 Needs upstream links All upstream links
114114
115 >>> anon_browser.getLink('All upstream links')115 >>> anon_browser.getLink('All upstream links')
diff --git a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
index b7ab998..5b2819a 100644
--- a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
+++ b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
@@ -28,7 +28,7 @@ Start out with a clean page containing no imported keys:
28 >>> browser = setupBrowserFreshLogin(name12)28 >>> browser = setupBrowserFreshLogin(name12)
29 >>> browser.open("http://launchpad.test/~name12")29 >>> browser.open("http://launchpad.test/~name12")
30 >>> browser.getLink(url='+editpgpkeys').click()30 >>> browser.getLink(url='+editpgpkeys').click()
31 >>> print browser.title31 >>> print(browser.title)
32 Change your OpenPGP keys...32 Change your OpenPGP keys...
3333
34 >>> browser.getControl(name='DEACTIVATE_GPGKEY')34 >>> browser.getControl(name='DEACTIVATE_GPGKEY')
@@ -62,7 +62,7 @@ followed by ASCII armored encrypted confirmation instructions. Ensure that
62the clear text instructions contain the expected URLs pointing to more help.62the clear text instructions contain the expected URLs pointing to more help.
6363
64 >>> cipher_body = msg.get_payload(decode=True)64 >>> cipher_body = msg.get_payload(decode=True)
65 >>> print cipher_body65 >>> print(cipher_body)
66 Hello,66 Hello,
67 <BLANKLINE>67 <BLANKLINE>
68 This message contains the instructions for confirming registration of an68 This message contains the instructions for confirming registration of an
@@ -123,7 +123,7 @@ Go to the link sent by email, to validate the email address.
123123
124Get redirected to +validategpg, and confirm token:124Get redirected to +validategpg, and confirm token:
125125
126 >>> print browser.url126 >>> print(browser.url)
127 http://launchpad.test/token/.../+validategpg127 http://launchpad.test/token/.../+validategpg
128 >>> browser.getControl('Continue').click()128 >>> browser.getControl('Continue').click()
129129
@@ -146,9 +146,9 @@ Verify that the key was imported with the "can encrypt" flag set:
146 >>> from lp.registry.model.gpgkey import GPGKey146 >>> from lp.registry.model.gpgkey import GPGKey
147 >>> key = GPGKey.selectOneBy(147 >>> key = GPGKey.selectOneBy(
148 ... fingerprint='A419AE861E88BC9E04B9C26FBA2B9389DFD20543')148 ... fingerprint='A419AE861E88BC9E04B9C26FBA2B9389DFD20543')
149 >>> print key.owner.name149 >>> print(key.owner.name)
150 name12150 name12
151 >>> print key.can_encrypt151 >>> print(key.can_encrypt)
152 True152 True
153153
154154
@@ -188,7 +188,7 @@ ability to decrypt text with this key.
188The email does contain some information about the key, and a token URL188The email does contain some information about the key, and a token URL
189Sample Person should visit to verify their ownership of the key.189Sample Person should visit to verify their ownership of the key.
190190
191 >>> print body191 >>> print(body)
192 <BLANKLINE>192 <BLANKLINE>
193 Hello,193 Hello,
194 ...194 ...
@@ -231,7 +231,7 @@ Let's look at the text.
231231
232 >>> verification_content = find_main_content(232 >>> verification_content = find_main_content(
233 ... browser.contents).pre.string233 ... browser.contents).pre.string
234 >>> print verification_content234 >>> print(verification_content)
235 Please register 447DBF38C4F9C4ED752246B77D88913717B05A8F to the235 Please register 447DBF38C4F9C4ED752246B77D88913717B05A8F to the
236 Launchpad user name12. 2005-04-01 12:00:00 UTC236 Launchpad user name12. 2005-04-01 12:00:00 UTC
237237
@@ -354,7 +354,7 @@ Sample person has never signed a code of conduct.
354354
355 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')355 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')
356 >>> browser.open('http://launchpad.test/~name12/+codesofconduct')356 >>> browser.open('http://launchpad.test/~name12/+codesofconduct')
357 >>> print extract_text(find_main_content(browser.contents))357 >>> print(extract_text(find_main_content(browser.contents)))
358 Codes of Conduct for Sample Person358 Codes of Conduct for Sample Person
359 Launchpad records codes of conduct you sign as commitments to the359 Launchpad records codes of conduct you sign as commitments to the
360 principles of collaboration, tolerance and open communication that360 principles of collaboration, tolerance and open communication that
@@ -401,11 +401,11 @@ that there is a new version available.
401401
402 >>> browser.open('http://launchpad.test/codeofconduct/1.0/+sign')402 >>> browser.open('http://launchpad.test/codeofconduct/1.0/+sign')
403 >>> browser.getLink('the current version').click()403 >>> browser.getLink('the current version').click()
404 >>> print browser.url404 >>> print(browser.url)
405 http://launchpad.test/codeofconduct/2.0405 http://launchpad.test/codeofconduct/2.0
406406
407 >>> browser.getLink('Sign it').click()407 >>> browser.getLink('Sign it').click()
408 >>> print browser.url408 >>> print(browser.url)
409 http://launchpad.test/codeofconduct/2.0/+sign409 http://launchpad.test/codeofconduct/2.0/+sign
410410
411411
@@ -419,13 +419,13 @@ appear in the same order.
419 >>> reformatted_coc = read_file('reformatted_20_coc.asc')419 >>> reformatted_coc = read_file('reformatted_20_coc.asc')
420 >>> browser.getControl('Signed Code').value = reformatted_coc420 >>> browser.getControl('Signed Code').value = reformatted_coc
421 >>> browser.getControl('Continue').click()421 >>> browser.getControl('Continue').click()
422 >>> print browser.url422 >>> print(browser.url)
423 http://launchpad.test/~name12/+codesofconduct423 http://launchpad.test/~name12/+codesofconduct
424424
425And now Sample Person's Codes of Conduct page shows that they've signed it.425And now Sample Person's Codes of Conduct page shows that they've signed it.
426426
427 >>> browser.open('http://launchpad.test/~name12/+codesofconduct')427 >>> browser.open('http://launchpad.test/~name12/+codesofconduct')
428 >>> print extract_text(find_main_content(browser.contents))428 >>> print(extract_text(find_main_content(browser.contents)))
429 Codes of Conduct for Sample Person429 Codes of Conduct for Sample Person
430 Launchpad records codes of conduct you sign as commitments to the430 Launchpad records codes of conduct you sign as commitments to the
431 principles of collaboration, tolerance and open communication that431 principles of collaboration, tolerance and open communication that
@@ -444,7 +444,7 @@ Now Sample Person will deactivate their key...
444 >>> browser.url444 >>> browser.url
445 'http://launchpad.test/~name12/+editpgpkeys'445 'http://launchpad.test/~name12/+editpgpkeys'
446446
447 >>> print browser.contents447 >>> print(browser.contents)
448 <...448 <...
449 ...Your active keys...449 ...Your active keys...
450 ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543...450 ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543...
@@ -454,7 +454,7 @@ Now Sample Person will deactivate their key...
454454
455 >>> browser.getControl('Deactivate Key').click()455 >>> browser.getControl('Deactivate Key').click()
456 >>> for tag in find_main_content(browser.contents)('p', 'error message'):456 >>> for tag in find_main_content(browser.contents)('p', 'error message'):
457 ... print tag.renderContents()457 ... print(tag.renderContents())
458 No key(s) selected for deactivation.458 No key(s) selected for deactivation.
459459
460460
@@ -465,7 +465,7 @@ Now they select the checkbox and deactivate it.
465 >>> browser.getControl('Deactivate Key').click()465 >>> browser.getControl('Deactivate Key').click()
466 >>> soup = find_main_content(browser.contents)466 >>> soup = find_main_content(browser.contents)
467 >>> for tag in soup('p', 'informational message'):467 >>> for tag in soup('p', 'informational message'):
468 ... print tag.renderContents()468 ... print(tag.renderContents())
469 Deactivated key(s): 1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543469 Deactivated key(s): 1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543
470470
471471
@@ -475,7 +475,7 @@ Sample Person already has a deactivated key.
475 >>> browser.url475 >>> browser.url
476 'http://launchpad.test/~name12/+editpgpkeys'476 'http://launchpad.test/~name12/+editpgpkeys'
477477
478 >>> print browser.contents478 >>> print(browser.contents)
479 <...479 <...
480 ...Deactivated keys...480 ...Deactivated keys...
481 ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543...481 ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543...
@@ -486,7 +486,7 @@ Now they'll request their key to be reactivated.
486 >>> browser.getControl('Reactivate Key').click()486 >>> browser.getControl('Reactivate Key').click()
487 >>> soup = find_main_content(browser.contents)487 >>> soup = find_main_content(browser.contents)
488 >>> for tag in soup('p', 'error message'):488 >>> for tag in soup('p', 'error message'):
489 ... print tag.renderContents()489 ... print(tag.renderContents())
490 No key(s) selected for reactivation.490 No key(s) selected for reactivation.
491491
492 >>> browser.getControl(492 >>> browser.getControl(
@@ -494,7 +494,7 @@ Now they'll request their key to be reactivated.
494 >>> browser.getControl('Reactivate Key').click()494 >>> browser.getControl('Reactivate Key').click()
495 >>> soup = find_main_content(browser.contents)495 >>> soup = find_main_content(browser.contents)
496 >>> for tag in soup('p', 'informational message'):496 >>> for tag in soup('p', 'informational message'):
497 ... print tag.renderContents()497 ... print(tag.renderContents())
498 A message has been sent to test@canonical.com with instructions to reactivate...498 A message has been sent to test@canonical.com with instructions to reactivate...
499499
500500
@@ -518,7 +518,7 @@ token type (+validategpg).
518 >>> browser.url == '%s/+validategpg' % token_url518 >>> browser.url == '%s/+validategpg' % token_url
519 True519 True
520520
521 >>> print browser.contents521 >>> print(browser.contents)
522 <...522 <...
523 ...Confirm the OpenPGP key...A419AE861E88BC9E04B9C26FBA2B9389DFD20543...523 ...Confirm the OpenPGP key...A419AE861E88BC9E04B9C26FBA2B9389DFD20543...
524 ...Sample Person...524 ...Sample Person...
@@ -530,7 +530,7 @@ Now Sample Person confirms the reactivation.
530 >>> browser.url530 >>> browser.url
531 'http://launchpad.test/~name12'531 'http://launchpad.test/~name12'
532532
533 >>> print browser.contents533 >>> print(browser.contents)
534 <...534 <...
535 ...Key 1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543 successfully535 ...Key 1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543 successfully
536 reactivated...536 reactivated...
@@ -539,7 +539,7 @@ Now Sample Person confirms the reactivation.
539And now we can see the key listed as one of Sample Person's active keys.539And now we can see the key listed as one of Sample Person's active keys.
540540
541 >>> browser.open('http://launchpad.test/~name12/+editpgpkeys')541 >>> browser.open('http://launchpad.test/~name12/+editpgpkeys')
542 >>> print browser.contents542 >>> print(browser.contents)
543 <...543 <...
544 ...Your active keys...544 ...Your active keys...
545 ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543...545 ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543...
@@ -567,7 +567,7 @@ Try to import a key which is already imported:
567 False567 False
568 >>> stub.test_emails568 >>> stub.test_emails
569 []569 []
570 >>> print browser.contents570 >>> print(browser.contents)
571 <BLANKLINE>571 <BLANKLINE>
572 ...572 ...
573 ...has already been imported...573 ...has already been imported...
@@ -578,11 +578,11 @@ Try to import a key which is already imported:
578578
579Ensure we are raising 404 error instead of System Error579Ensure we are raising 404 error instead of System Error
580580
581 >>> print http(r"""581 >>> print(http(r"""
582 ... POST /codeofconduct/donkey HTTP/1.1582 ... POST /codeofconduct/donkey HTTP/1.1
583 ... Authorization: Basic Zm9vLmJhckBjYW5vbmljYWwuY29tOnRlc3Q=583 ... Authorization: Basic Zm9vLmJhckBjYW5vbmljYWwuY29tOnRlc3Q=
584 ... Referer: https://launchpad.test/584 ... Referer: https://launchpad.test/
585 ... """)585 ... """))
586 HTTP/1.1 404 Not Found586 HTTP/1.1 404 Not Found
587 ...587 ...
588588
@@ -613,7 +613,7 @@ Ensure the CoC was acknowledge by searching in the CoC Admin Console:
613 >>> admin_browser.getControl(name='searchfor').value = ["all"]613 >>> admin_browser.getControl(name='searchfor').value = ["all"]
614 >>> admin_browser.getControl(name='name').value = "mark"614 >>> admin_browser.getControl(name='name').value = "mark"
615 >>> admin_browser.getControl(name='search').click()615 >>> admin_browser.getControl(name='search').click()
616 >>> print extract_text(find_tag_by_id(admin_browser.contents, 'matches'))616 >>> print(extract_text(find_tag_by_id(admin_browser.contents, 'matches')))
617 Mark ... paper submission accepted by Foo Bar [ACTIVE]617 Mark ... paper submission accepted by Foo Bar [ACTIVE]
618618
619Test if the advertisement email was sent:619Test if the advertisement email was sent:
@@ -622,7 +622,7 @@ Test if the advertisement email was sent:
622 >>> from lp.services.mail import stub622 >>> from lp.services.mail import stub
623 >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop()623 >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop()
624 >>> msg = email.message_from_string(raw_msg)624 >>> msg = email.message_from_string(raw_msg)
625 >>> print msg.get_payload(decode=True)625 >>> print(msg.get_payload(decode=True))
626 <BLANKLINE>626 <BLANKLINE>
627 ...627 ...
628 User: 'Mark Shuttleworth'628 User: 'Mark Shuttleworth'
diff --git a/lib/lp/registry/stories/gpg-coc/xx-ubuntu-codeofconduct-signer.txt b/lib/lp/registry/stories/gpg-coc/xx-ubuntu-codeofconduct-signer.txt
index 7bcc4c2..58dc5c4 100644
--- a/lib/lp/registry/stories/gpg-coc/xx-ubuntu-codeofconduct-signer.txt
+++ b/lib/lp/registry/stories/gpg-coc/xx-ubuntu-codeofconduct-signer.txt
@@ -7,21 +7,21 @@ Administrators can see the signed Ubuntu Code of Conducts of any given person.
7 >>> admin_browser.open('http://launchpad.test/~name16')7 >>> admin_browser.open('http://launchpad.test/~name16')
8 >>> admin_browser.url8 >>> admin_browser.url
9 'http://launchpad.test/~name16'9 'http://launchpad.test/~name16'
10 >>> print extract_text(10 >>> print(extract_text(
11 ... find_tag_by_id(admin_browser.contents, 'ubuntu-coc'))11 ... find_tag_by_id(admin_browser.contents, 'ubuntu-coc')))
12 Signed Ubuntu Code of Conduct: Yes12 Signed Ubuntu Code of Conduct: Yes
1313
14 >>> admin_browser.getLink(url='+codesofconduct').click()14 >>> admin_browser.getLink(url='+codesofconduct').click()
15 >>> signatures = find_tags_by_class(admin_browser.contents, 'signature')15 >>> signatures = find_tags_by_class(admin_browser.contents, 'signature')
16 >>> for signature in signatures:16 >>> for signature in signatures:
17 ... print extract_text(signature)17 ... print(extract_text(signature))
18 2005-09-27: digitally signed by Foo Bar18 2005-09-27: digitally signed by Foo Bar
19 (1024D/ABCDEF0123456789ABCDDCBA0000111112345678)19 (1024D/ABCDEF0123456789ABCDDCBA0000111112345678)
2020
21A regular user can't see the link to Foo Bar's signed codes of conduct.21A regular user can't see the link to Foo Bar's signed codes of conduct.
2222
23 >>> browser.open('http://launchpad.test/~name16')23 >>> browser.open('http://launchpad.test/~name16')
24 >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc'))24 >>> print(extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc')))
25 Signed Ubuntu Code of Conduct: Yes25 Signed Ubuntu Code of Conduct: Yes
2626
27 >>> browser.getLink(url='+codesofconduct')27 >>> browser.getLink(url='+codesofconduct')
@@ -34,7 +34,7 @@ link to the Ubuntu Code of Conduct forms.
3434
35 >>> browser.addHeader('Authorization', 'Basic no-priv@canonical.com:test')35 >>> browser.addHeader('Authorization', 'Basic no-priv@canonical.com:test')
36 >>> browser.open('http://launchpad.test/~no-priv')36 >>> browser.open('http://launchpad.test/~no-priv')
37 >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc'))37 >>> print(extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc')))
38 Signed Ubuntu Code of Conduct: No38 Signed Ubuntu Code of Conduct: No
3939
40 >>> browser.getLink(url='codeofconduct')40 >>> browser.getLink(url='codeofconduct')
diff --git a/lib/lp/registry/stories/location/personlocation-edit.txt b/lib/lp/registry/stories/location/personlocation-edit.txt
index 53a5d66..a70877e 100644
--- a/lib/lp/registry/stories/location/personlocation-edit.txt
+++ b/lib/lp/registry/stories/location/personlocation-edit.txt
@@ -36,5 +36,5 @@ selected value.
3636
37 >>> self_browser.open('http://launchpad.test/~zzz')37 >>> self_browser.open('http://launchpad.test/~zzz')
38 >>> self_browser.getLink('Set location and time zone').click()38 >>> self_browser.getLink('Set location and time zone').click()
39 >>> print self_browser.getControl(name='field.time_zone').value39 >>> print(self_browser.getControl(name='field.time_zone').value)
40 ['Europe/Madrid']40 ['Europe/Madrid']
diff --git a/lib/lp/registry/stories/mailinglists/hosted-email-address.txt b/lib/lp/registry/stories/mailinglists/hosted-email-address.txt
index ec44e44..f9cebb1 100644
--- a/lib/lp/registry/stories/mailinglists/hosted-email-address.txt
+++ b/lib/lp/registry/stories/mailinglists/hosted-email-address.txt
@@ -38,7 +38,7 @@ Launchpad sends that address a confirmation message.
38 >>> user_browser.getControl(38 >>> user_browser.getControl(
39 ... name='field.contact_address').value = 'bar@example.com'39 ... name='field.contact_address').value = 'bar@example.com'
40 >>> user_browser.getControl('Change').click()40 >>> user_browser.getControl('Change').click()
41 >>> print user_browser.title41 >>> print(user_browser.title)
42 Aardvarks in Launchpad42 Aardvarks in Launchpad
43 >>> print_feedback_messages(user_browser.contents)43 >>> print_feedback_messages(user_browser.contents)
44 A confirmation message has been sent to...44 A confirmation message has been sent to...
@@ -47,9 +47,9 @@ Launchpad sends that address a confirmation message.
47 []47 []
48 >>> import email48 >>> import email
49 >>> msg = email.message_from_string(raw_msg)49 >>> msg = email.message_from_string(raw_msg)
50 >>> print msg['From']50 >>> print(msg['From'])
51 Launchpad Email Validator <noreply@launchpad.net>51 Launchpad Email Validator <noreply@launchpad.net>
52 >>> print msg['Subject']52 >>> print(msg['Subject'])
53 Launchpad: Validate your team's contact email address53 Launchpad: Validate your team's contact email address
5454
55When the confirmation token url is followed, the external email address is55When the confirmation token url is followed, the external email address is
@@ -59,10 +59,10 @@ confirmed.
59 ... get_token_url_from_email)59 ... get_token_url_from_email)
60 >>> token_url = get_token_url_from_email(raw_msg)60 >>> token_url = get_token_url_from_email(raw_msg)
61 >>> user_browser.open(token_url)61 >>> user_browser.open(token_url)
62 >>> print user_browser.title62 >>> print(user_browser.title)
63 Confirm email address63 Confirm email address
64 >>> user_browser.getControl('Continue').click()64 >>> user_browser.getControl('Continue').click()
65 >>> print user_browser.title65 >>> print(user_browser.title)
66 Aardvarks in Launchpad66 Aardvarks in Launchpad
67 >>> print_feedback_messages(user_browser.contents)67 >>> print_feedback_messages(user_browser.contents)
68 Email address successfully confirmed.68 Email address successfully confirmed.
diff --git a/lib/lp/registry/stories/mailinglists/lifecycle.txt b/lib/lp/registry/stories/mailinglists/lifecycle.txt
index ca20341..fccd031 100644
--- a/lib/lp/registry/stories/mailinglists/lifecycle.txt
+++ b/lib/lp/registry/stories/mailinglists/lifecycle.txt
@@ -15,19 +15,19 @@ The owner of Landscape Developers applies for a mailing list.
15 >>> browser.open('http://launchpad.test/~landscape-developers')15 >>> browser.open('http://launchpad.test/~landscape-developers')
16 >>> browser.getLink(url='+mailinglist').click()16 >>> browser.getLink(url='+mailinglist').click()
17 >>> from lp.services.helpers import backslashreplace17 >>> from lp.services.helpers import backslashreplace
18 >>> print backslashreplace(browser.title)18 >>> print(backslashreplace(browser.title))
19 Mailing list configuration...19 Mailing list configuration...
2020
21They think for a second whether their mailing list is for Ubuntu or not.21They think for a second whether their mailing list is for Ubuntu or not.
2222
23 >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-notice'))23 >>> print(extract_text(find_tag_by_id(browser.contents, 'ubuntu-notice')))
24 Ubuntu does not use Launchpad to host its mailing lists. Create them24 Ubuntu does not use Launchpad to host its mailing lists. Create them
25 at lists.ubuntu.com instead.25 at lists.ubuntu.com instead.
26 >>> print browser.getLink('lists.ubuntu.com')26 >>> print(browser.getLink('lists.ubuntu.com'))
27 <Link text='lists.ubuntu.com' url='https://lists.ubuntu.com'>27 <Link text='lists.ubuntu.com' url='https://lists.ubuntu.com'>
2828
29 >>> browser.getControl('Create new Mailing List').click()29 >>> browser.getControl('Create new Mailing List').click()
30 >>> print browser.title30 >>> print(browser.title)
31 Landscape Developers in Launchpad31 Landscape Developers in Launchpad
32 >>> print_feedback_messages(browser.contents)32 >>> print_feedback_messages(browser.contents)
33 The mailing list is being created and will be available for use in a few minutes.33 The mailing list is being created and will be available for use in a few minutes.
@@ -52,7 +52,7 @@ Just because a mailing list has been applied for does not mean it has an
52archive link yet.52archive link yet.
5353
54 >>> browser.open('http://launchpad.test/~landscape-developers')54 >>> browser.open('http://launchpad.test/~landscape-developers')
55 >>> print find_tag_by_id(browser.contents, 'mailing-list-archive')55 >>> print(find_tag_by_id(browser.contents, 'mailing-list-archive'))
56 None56 None
5757
58Even after the list has been created, it still cannot be used as the contact58Even after the list has been created, it still cannot be used as the contact
@@ -60,7 +60,7 @@ address until Mailman has acknowledged successful creation.
6060
61 >>> browser.reload()61 >>> browser.reload()
62 >>> browser.getLink(url='+mailinglist').click()62 >>> browser.getLink(url='+mailinglist').click()
63 >>> print mailing_list_status_message(browser.contents)63 >>> print(mailing_list_status_message(browser.contents))
64 This team's mailing list will be available within a few minutes.64 This team's mailing list will be available within a few minutes.
6565
66Mailman eventually wakes up and creates the mailing list.66Mailman eventually wakes up and creates the mailing list.
@@ -78,14 +78,14 @@ is true even if no messages have yet been posted to the mailing list (since
78the archiver will display an informative message to that effect).78the archiver will display an informative message to that effect).
7979
80 >>> browser.open('http://launchpad.test/~landscape-developers')80 >>> browser.open('http://launchpad.test/~landscape-developers')
81 >>> print extract_link_from_tag(81 >>> print(extract_link_from_tag(
82 ... find_tag_by_id(browser.contents, 'mailing-list-archive'))82 ... find_tag_by_id(browser.contents, 'mailing-list-archive')))
83 http://lists.launchpad.test/landscape-developers83 http://lists.launchpad.test/landscape-developers
8484
85The team's overview page also displays the posting address.85The team's overview page also displays the posting address.
8686
87 >>> print extract_text(87 >>> print(extract_text(
88 ... find_tag_by_id(browser.contents, 'mailing-list-posting-address'))88 ... find_tag_by_id(browser.contents, 'mailing-list-posting-address')))
89 landscape-developers@lists.launchpad.test89 landscape-developers@lists.launchpad.test
9090
91Now that the mailing list is active, it can be used as the team's contact91Now that the mailing list is active, it can be used as the team's contact
@@ -94,8 +94,8 @@ address.
94 >>> from lp.testing.pages import strip_label94 >>> from lp.testing.pages import strip_label
9595
96 >>> browser.getLink(url='+mailinglist').click()96 >>> browser.getLink(url='+mailinglist').click()
97 >>> print extract_text(find_tag_by_id(browser.contents,97 >>> print(extract_text(find_tag_by_id(browser.contents,
98 ... 'mailing_list_not_contact_address'))98 ... 'mailing_list_not_contact_address')))
99 The mailing list is not set as the team contact address. You can99 The mailing list is not set as the team contact address. You can
100 set it.100 set it.
101101
@@ -110,7 +110,7 @@ address.
110110
111The mailing list's configuration screen is also now available.111The mailing list's configuration screen is also now available.
112112
113 >>> print browser.getLink(url='+mailinglist').url113 >>> print(browser.getLink(url='+mailinglist').url)
114 http://launchpad.test/~landscape-developers/+mailinglist114 http://launchpad.test/~landscape-developers/+mailinglist
115115
116When the mailing list is not the team's contact address, the mailing116When the mailing list is not the team's contact address, the mailing
@@ -120,8 +120,8 @@ list configuration screen displays a message to this effect.
120 >>> browser.getControl('Change').click()120 >>> browser.getControl('Change').click()
121121
122 >>> browser.getLink(url='+mailinglist').click()122 >>> browser.getLink(url='+mailinglist').click()
123 >>> print extract_text(find_tag_by_id(browser.contents,123 >>> print(extract_text(find_tag_by_id(browser.contents,
124 ... 'mailing_list_not_contact_address'))124 ... 'mailing_list_not_contact_address')))
125 The mailing list is not set as the team contact address. You can125 The mailing list is not set as the team contact address. You can
126 set it.126 set it.
127127
@@ -130,7 +130,7 @@ The message contains a link to the contact address screen.
130 >>> browser.getLink('set it').click()130 >>> browser.getLink('set it').click()
131 >>> browser.getControl('The Launchpad mailing list').selected = True131 >>> browser.getControl('The Launchpad mailing list').selected = True
132 >>> browser.getControl('Change').click()132 >>> browser.getControl('Change').click()
133 >>> print browser.title133 >>> print(browser.title)
134 Landscape Developers in Launchpad134 Landscape Developers in Launchpad
135135
136When the mailing list is the team's contact address, the message does136When the mailing list is the team's contact address, the message does
@@ -169,15 +169,15 @@ to 'each user individually'.
169 >>> act()169 >>> act()
170 >>> browser.open(170 >>> browser.open(
171 ... 'http://launchpad.test/~landscape-developers/+mailinglist')171 ... 'http://launchpad.test/~landscape-developers/+mailinglist')
172 >>> print mailing_list_status_message(browser.contents)172 >>> print(mailing_list_status_message(browser.contents))
173 This team's mailing list has been deactivated.173 This team's mailing list has been deactivated.
174174
175A deactivated mailing list still has a link to its archive, because archives175A deactivated mailing list still has a link to its archive, because archives
176are never deleted.176are never deleted.
177177
178 >>> browser.open('http://launchpad.test/~landscape-developers')178 >>> browser.open('http://launchpad.test/~landscape-developers')
179 >>> print extract_link_from_tag(179 >>> print(extract_link_from_tag(
180 ... find_tag_by_id(browser.contents, 'mailing-list-archive'))180 ... find_tag_by_id(browser.contents, 'mailing-list-archive')))
181 http://lists.launchpad.test/landscape-developers181 http://lists.launchpad.test/landscape-developers
182182
183An inactive mailing list can be reactivated.183An inactive mailing list can be reactivated.
@@ -205,8 +205,8 @@ This does not restore the mailing list as the team's contact method:
205Of course, the reactivated list still has a link to its archive.205Of course, the reactivated list still has a link to its archive.
206206
207 >>> browser.open('http://launchpad.test/~landscape-developers')207 >>> browser.open('http://launchpad.test/~landscape-developers')
208 >>> print extract_link_from_tag(208 >>> print(extract_link_from_tag(
209 ... find_tag_by_id(browser.contents, 'mailing-list-archive'))209 ... find_tag_by_id(browser.contents, 'mailing-list-archive')))
210 http://lists.launchpad.test/landscape-developers210 http://lists.launchpad.test/landscape-developers
211211
212The archive link is only available for public mailing lists as shown above,212The archive link is only available for public mailing lists as shown above,
@@ -222,8 +222,8 @@ and for private mailing lists for team members.
222The owner of the list can see archive link.222The owner of the list can see archive link.
223223
224 >>> user_browser.open('http://launchpad.test/~bassists')224 >>> user_browser.open('http://launchpad.test/~bassists')
225 >>> print extract_link_from_tag(225 >>> print(extract_link_from_tag(
226 ... find_tag_by_id(user_browser.contents, 'mailing-list-archive'))226 ... find_tag_by_id(user_browser.contents, 'mailing-list-archive')))
227 http://lists.launchpad.test/bassists227 http://lists.launchpad.test/bassists
228228
229Anonymous users cannot see the link, because they cannot even see the229Anonymous users cannot see the link, because they cannot even see the
@@ -255,15 +255,15 @@ Members who are not owners can see the link.
255 >>> admin_browser.getControl('Add Member').click()255 >>> admin_browser.getControl('Add Member').click()
256256
257 >>> cprov_browser.open('http://launchpad.test/~bassists')257 >>> cprov_browser.open('http://launchpad.test/~bassists')
258 >>> print extract_link_from_tag(258 >>> print(extract_link_from_tag(
259 ... find_tag_by_id(cprov_browser.contents, 'mailing-list-archive'))259 ... find_tag_by_id(cprov_browser.contents, 'mailing-list-archive')))
260 http://lists.launchpad.test/bassists260 http://lists.launchpad.test/bassists
261261
262Admins who are not members of the team can see the link too.262Admins who are not members of the team can see the link too.
263263
264 >>> admin_browser.open('http://launchpad.test/~bassists')264 >>> admin_browser.open('http://launchpad.test/~bassists')
265 >>> print extract_link_from_tag(265 >>> print(extract_link_from_tag(
266 ... find_tag_by_id(admin_browser.contents, 'mailing-list-archive'))266 ... find_tag_by_id(admin_browser.contents, 'mailing-list-archive')))
267 http://lists.launchpad.test/bassists267 http://lists.launchpad.test/bassists
268268
269269
@@ -287,14 +287,14 @@ to delete the archives of an INACTIVE list, this must be done manually.
287 >>> def print_list_state(team_name=u'aardvarks'):287 >>> def print_list_state(team_name=u'aardvarks'):
288 ... login('foo.bar@canonical.com')288 ... login('foo.bar@canonical.com')
289 ... mailing_list = getUtility(IMailingListSet).get(team_name)289 ... mailing_list = getUtility(IMailingListSet).get(team_name)
290 ... print mailing_list.status.name290 ... print(mailing_list.status.name)
291 ... logout()291 ... logout()
292292
293The team owner can see that they can purge or reactivate mailing list.293The team owner can see that they can purge or reactivate mailing list.
294294
295 >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist')295 >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist')
296 >>> user_browser.getControl('Create new Mailing List').click()296 >>> user_browser.getControl('Create new Mailing List').click()
297 >>> print user_browser.title297 >>> print(user_browser.title)
298 Aardvarks in Launchpad298 Aardvarks in Launchpad
299 >>> act()299 >>> act()
300 >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist')300 >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist')
@@ -310,7 +310,7 @@ The team owner can see that they can purge or reactivate mailing list.
310 ... return tag.p.contents[0].strip()310 ... return tag.p.contents[0].strip()
311311
312 >>> user_browser.getLink(url='+mailinglist').click()312 >>> user_browser.getLink(url='+mailinglist').click()
313 >>> print purge_text(user_browser)313 >>> print(purge_text(user_browser))
314 You can purge this mailing list...314 You can purge this mailing list...
315315
316 >>> user_browser.getControl('Reactivate this Mailing List')316 >>> user_browser.getControl('Reactivate this Mailing List')
@@ -338,7 +338,7 @@ administrator, can purge a list.
338338
339 >>> expert_browser = setupBrowser('Basic test@canonical.com:test')339 >>> expert_browser = setupBrowser('Basic test@canonical.com:test')
340 >>> expert_browser.open('http://launchpad.test/~aardvarks/+mailinglist')340 >>> expert_browser.open('http://launchpad.test/~aardvarks/+mailinglist')
341 >>> print purge_text(expert_browser)341 >>> print(purge_text(expert_browser))
342 You can purge this mailing list...342 You can purge this mailing list...
343343
344A constructing, modified, updating, or deactivating or mod-failed list cannot344A constructing, modified, updating, or deactivating or mod-failed list cannot
@@ -361,9 +361,9 @@ be purged.
361 ... set_list_state(u'aardvarks', status)361 ... set_list_state(u'aardvarks', status)
362 ... print_list_state()362 ... print_list_state()
363 ... admin_browser.open(url)363 ... admin_browser.open(url)
364 ... print purge_text(admin_browser)364 ... print(purge_text(admin_browser))
365 ... expert_browser.open(url)365 ... expert_browser.open(url)
366 ... print purge_text(expert_browser)366 ... print(purge_text(expert_browser))
367367
368A purged list acts as if it doesn't even exist.368A purged list acts as if it doesn't even exist.
369369
diff --git a/lib/lp/registry/stories/mailinglists/subscriptions.txt b/lib/lp/registry/stories/mailinglists/subscriptions.txt
index d993e0a..9cbc162 100644
--- a/lib/lp/registry/stories/mailinglists/subscriptions.txt
+++ b/lib/lp/registry/stories/mailinglists/subscriptions.txt
@@ -92,7 +92,7 @@ it's currently the team contact method.
92 >>> carlos_browser.getLink(url="+editmailinglists").click()92 >>> carlos_browser.getLink(url="+editmailinglists").click()
9393
94 >>> from lp.services.helpers import backslashreplace94 >>> from lp.services.helpers import backslashreplace
95 >>> print backslashreplace(carlos_browser.title)95 >>> print(backslashreplace(carlos_browser.title))
96 Change your mailing list subscriptions...96 Change your mailing list subscriptions...
9797
98 >>> admins = carlos_browser.getControl(name='field.subscription.admins')98 >>> admins = carlos_browser.getControl(name='field.subscription.admins')
@@ -103,9 +103,9 @@ it's currently the team contact method.
103 ['Preferred address', "Don't subscribe",103 ['Preferred address', "Don't subscribe",
104 'carlos@canonical.com', 'carlos@test.com']104 'carlos@canonical.com', 'carlos@test.com']
105105
106 >>> print admins.value106 >>> print(admins.value)
107 ["Don't subscribe"]107 ["Don't subscribe"]
108 >>> print rosetta_admins.value108 >>> print(rosetta_admins.value)
109 ["Don't subscribe"]109 ["Don't subscribe"]
110110
111However, testing-spanish-team's list doesn't show up because its creation has111However, testing-spanish-team's list doesn't show up because its creation has
@@ -133,9 +133,9 @@ explicitly with whatever is his preferred email address.
133 >>> admins = carlos_browser.getControl(name='field.subscription.admins')133 >>> admins = carlos_browser.getControl(name='field.subscription.admins')
134 >>> rosetta_admins = carlos_browser.getControl(134 >>> rosetta_admins = carlos_browser.getControl(
135 ... name='field.subscription.rosetta-admins')135 ... name='field.subscription.rosetta-admins')
136 >>> print admins.value136 >>> print(admins.value)
137 ['Preferred address']137 ['Preferred address']
138 >>> print rosetta_admins.value138 >>> print(rosetta_admins.value)
139 ["Don't subscribe"]139 ["Don't subscribe"]
140140
141Carlos can subscribe to a list using any of his validated addresses141Carlos can subscribe to a list using any of his validated addresses
@@ -148,9 +148,9 @@ explicitly.
148 >>> admins = carlos_browser.getControl(name='field.subscription.admins')148 >>> admins = carlos_browser.getControl(name='field.subscription.admins')
149 >>> rosetta_admins = carlos_browser.getControl(149 >>> rosetta_admins = carlos_browser.getControl(
150 ... name='field.subscription.rosetta-admins')150 ... name='field.subscription.rosetta-admins')
151 >>> print admins.value151 >>> print(admins.value)
152 ['carlos@canonical.com']152 ['carlos@canonical.com']
153 >>> print rosetta_admins.value153 >>> print(rosetta_admins.value)
154 ['carlos@test.com']154 ['carlos@test.com']
155155
156He can switch from one address to another, or from a specific address156He can switch from one address to another, or from a specific address
@@ -163,9 +163,9 @@ to the preferred address.
163 >>> admins = carlos_browser.getControl(name='field.subscription.admins')163 >>> admins = carlos_browser.getControl(name='field.subscription.admins')
164 >>> rosetta_admins = carlos_browser.getControl(164 >>> rosetta_admins = carlos_browser.getControl(
165 ... name='field.subscription.rosetta-admins')165 ... name='field.subscription.rosetta-admins')
166 >>> print admins.value166 >>> print(admins.value)
167 ['Preferred address']167 ['Preferred address']
168 >>> print rosetta_admins.value168 >>> print(rosetta_admins.value)
169 ['carlos@canonical.com']169 ['carlos@canonical.com']
170170
171Finally, he can unsubscribe from any mailing list by setting the subscription171Finally, he can unsubscribe from any mailing list by setting the subscription
@@ -181,9 +181,9 @@ menu item to "Don't subscribe".
181 >>> admins = carlos_browser.getControl(name='field.subscription.admins')181 >>> admins = carlos_browser.getControl(name='field.subscription.admins')
182 >>> rosetta_admins = carlos_browser.getControl(182 >>> rosetta_admins = carlos_browser.getControl(
183 ... name='field.subscription.rosetta-admins')183 ... name='field.subscription.rosetta-admins')
184 >>> print admins.value184 >>> print(admins.value)
185 ["Don't subscribe"]185 ["Don't subscribe"]
186 >>> print rosetta_admins.value186 >>> print(rosetta_admins.value)
187 ["Don't subscribe"]187 ["Don't subscribe"]
188188
189189
@@ -200,7 +200,7 @@ Admins team, and he should know if the list is available.
200200
201 >>> carlos_browser.open('http://launchpad.test/~carlos')201 >>> carlos_browser.open('http://launchpad.test/~carlos')
202 >>> carlos_browser.getLink(url="+editmailinglists").click()202 >>> carlos_browser.getLink(url="+editmailinglists").click()
203 >>> print backslashreplace(carlos_browser.title)203 >>> print(backslashreplace(carlos_browser.title))
204 Change your mailing list subscriptions...204 Change your mailing list subscriptions...
205205
206 >>> rosetta_admins = carlos_browser.getControl(206 >>> rosetta_admins = carlos_browser.getControl(
@@ -223,7 +223,7 @@ Now Jdub can apply for team membership and mailing list access.
223 'http://launchpad.test/~rosetta-admins'223 'http://launchpad.test/~rosetta-admins'
224224
225 >>> for tag in find_tags_by_class(browser.contents, 'informational'):225 >>> for tag in find_tags_by_class(browser.contents, 'informational'):
226 ... print tag.renderContents()226 ... print(tag.renderContents())
227 Your request to join Rosetta Administrators is awaiting approval.227 Your request to join Rosetta Administrators is awaiting approval.
228 Your mailing list subscription is awaiting approval.228 Your mailing list subscription is awaiting approval.
229229
@@ -237,7 +237,7 @@ screen.
237 >>> jdub_browser = setupBrowserFreshLogin(jdub)237 >>> jdub_browser = setupBrowserFreshLogin(jdub)
238 >>> jdub_browser.open('http://launchpad.test/~jdub')238 >>> jdub_browser.open('http://launchpad.test/~jdub')
239 >>> jdub_browser.getLink(url="+editmailinglists").click()239 >>> jdub_browser.getLink(url="+editmailinglists").click()
240 >>> print jdub_browser.title240 >>> print(jdub_browser.title)
241 Change your mailing list subscriptions...241 Change your mailing list subscriptions...
242242
243 >>> jdub_browser.getControl(243 >>> jdub_browser.getControl(
@@ -254,7 +254,7 @@ been approved for the team.
254 >>> admin_browser.getLink('All members').click()254 >>> admin_browser.getLink('All members').click()
255 >>> admin_browser.getLink(255 >>> admin_browser.getLink(
256 ... url='/~rosetta-admins/+member/jdub').click()256 ... url='/~rosetta-admins/+member/jdub').click()
257 >>> print admin_browser.url257 >>> print(admin_browser.url)
258 http://launchpad.test/~rosetta-admins/+member/jdub258 http://launchpad.test/~rosetta-admins/+member/jdub
259 >>> admin_browser.getControl(name='approve').click()259 >>> admin_browser.getControl(name='approve').click()
260260
@@ -262,7 +262,7 @@ His mailing list subscription is now available to be managed.
262262
263 >>> jdub_browser.open('http://launchpad.test/~jdub')263 >>> jdub_browser.open('http://launchpad.test/~jdub')
264 >>> jdub_browser.getLink(url="+editmailinglists").click()264 >>> jdub_browser.getLink(url="+editmailinglists").click()
265 >>> print jdub_browser.title265 >>> print(jdub_browser.title)
266 Change your mailing list subscriptions...266 Change your mailing list subscriptions...
267267
268 >>> rosetta_team = jdub_browser.getControl(268 >>> rosetta_team = jdub_browser.getControl(
@@ -280,7 +280,7 @@ list is not presented.
280280
281 >>> browser.open('http://launchpad.test/~rosetta-admins')281 >>> browser.open('http://launchpad.test/~rosetta-admins')
282 >>> browser.getLink('Join the team').click()282 >>> browser.getLink('Join the team').click()
283 >>> print browser.url283 >>> print(browser.url)
284 http://launchpad.test/~rosetta-admins/+join284 http://launchpad.test/~rosetta-admins/+join
285285
286 >>> browser.getControl(name='mailinglist_subscribe')286 >>> browser.getControl(name='mailinglist_subscribe')
@@ -294,7 +294,7 @@ for teams that don't have mailing lists.
294294
295 >>> browser.open('http://launchpad.test/~testing-spanish-team')295 >>> browser.open('http://launchpad.test/~testing-spanish-team')
296 >>> browser.getLink('Join the team').click()296 >>> browser.getLink('Join the team').click()
297 >>> print browser.url297 >>> print(browser.url)
298 http://launchpad.test/~testing-spanish-team/+join298 http://launchpad.test/~testing-spanish-team/+join
299299
300 >>> browser.getControl(name='mailinglist_subscribe')300 >>> browser.getControl(name='mailinglist_subscribe')
@@ -309,7 +309,7 @@ if we visit the URL directly, as the link is not present on the Team
309Overview.)309Overview.)
310310
311 >>> browser.open('http://launchpad.test/~launchpad/+join')311 >>> browser.open('http://launchpad.test/~launchpad/+join')
312 >>> print browser.url312 >>> print(browser.url)
313 http://launchpad.test/~launchpad/+join313 http://launchpad.test/~launchpad/+join
314314
315 >>> browser.getControl(name='mailinglist_subscribe')315 >>> browser.getControl(name='mailinglist_subscribe')
@@ -330,7 +330,7 @@ page, because he is not subscribed to the team mailing list.
330330
331 >>> carlos_browser.open('http://launchpad.test/~admins')331 >>> carlos_browser.open('http://launchpad.test/~admins')
332 >>> carlos_browser.getLink('Subscribe to mailing list').click()332 >>> carlos_browser.getLink('Subscribe to mailing list').click()
333 >>> print carlos_browser.url333 >>> print(carlos_browser.url)
334 http://launchpad.test/~carlos/+editmailinglists334 http://launchpad.test/~carlos/+editmailinglists
335335
336The unsubscribe link is visible for the rosetta admins team, which336The unsubscribe link is visible for the rosetta admins team, which
@@ -343,11 +343,11 @@ has an active mailing list.
343 ... name='field.subscription.rosetta-admins')343 ... name='field.subscription.rosetta-admins')
344 >>> rosetta_admins.value = ['Preferred address']344 >>> rosetta_admins.value = ['Preferred address']
345 >>> carlos_browser.getControl('Update Subscriptions').click()345 >>> carlos_browser.getControl('Update Subscriptions').click()
346 >>> print rosetta_admins.value346 >>> print(rosetta_admins.value)
347 ['Preferred address']347 ['Preferred address']
348 >>> for tag in find_tags_by_class(348 >>> for tag in find_tags_by_class(
349 ... carlos_browser.contents, 'informational'):349 ... carlos_browser.contents, 'informational'):
350 ... print tag.renderContents()350 ... print(tag.renderContents())
351 Subscriptions updated.351 Subscriptions updated.
352352
353 >>> carlos_browser.open('http://launchpad.test/~rosetta-admins')353 >>> carlos_browser.open('http://launchpad.test/~rosetta-admins')
@@ -361,8 +361,8 @@ Clicking the link will unsubscribe you from the list immediately.
361 You have been unsubscribed from the team mailing list.361 You have been unsubscribed from the team mailing list.
362362
363 >>> carlos_browser.open('http://launchpad.test/~rosetta-admins')363 >>> carlos_browser.open('http://launchpad.test/~rosetta-admins')
364 >>> print extract_text(364 >>> print(extract_text(
365 ... find_tag_by_id(carlos_browser.contents, 'mailing-lists'))365 ... find_tag_by_id(carlos_browser.contents, 'mailing-lists')))
366 Mailing list...366 Mailing list...
367 Subscribe to mailing list...367 Subscribe to mailing list...
368368
@@ -370,8 +370,8 @@ The Ubuntu translators team, which does not have any lists configured,
370does not show either link.370does not show either link.
371371
372 >>> carlos_browser.open('http://launchpad.test/~ubuntu-translators')372 >>> carlos_browser.open('http://launchpad.test/~ubuntu-translators')
373 >>> print extract_text(373 >>> print(extract_text(
374 ... find_portlet(carlos_browser.contents, 'Mailing list'))374 ... find_portlet(carlos_browser.contents, 'Mailing list')))
375 Mailing list375 Mailing list
376 This team does not use Launchpad to host a mailing list.376 This team does not use Launchpad to host a mailing list.
377 Create a mailing list377 Create a mailing list
@@ -395,8 +395,8 @@ mailing list subscribers, if there is an active mailing list. The
395rosetta admins team has such a list and carlos is the owner.395rosetta admins team has such a list and carlos is the owner.
396396
397 >>> carlos_browser.open('http://launchpad.test/~rosetta-admins')397 >>> carlos_browser.open('http://launchpad.test/~rosetta-admins')
398 >>> print extract_text(398 >>> print(extract_text(
399 ... find_portlet(carlos_browser.contents, 'Mailing list'))399 ... find_portlet(carlos_browser.contents, 'Mailing list')))
400 Mailing list400 Mailing list
401 rosetta-admins@lists.launchpad.test401 rosetta-admins@lists.launchpad.test
402 Policy: You must be a team member to subscribe to the team mailing list.402 Policy: You must be a team member to subscribe to the team mailing list.
@@ -409,11 +409,11 @@ The mailing list for Rosetta Admins has no subscribers.
409because his membership on Rosetta Admins hasn't been approved)409because his membership on Rosetta Admins hasn't been approved)
410410
411 >>> carlos_browser.getLink('View subscribers').click()411 >>> carlos_browser.getLink('View subscribers').click()
412 >>> print carlos_browser.title412 >>> print(carlos_browser.title)
413 Mailing list subscribers for the Rosetta Administrators team...413 Mailing list subscribers for the Rosetta Administrators team...
414414
415 >>> print extract_text(415 >>> print(extract_text(
416 ... find_tag_by_id(carlos_browser.contents, 'subscribers'))416 ... find_tag_by_id(carlos_browser.contents, 'subscribers')))
417 Nobody has subscribed to this team's mailing list yet.417 Nobody has subscribed to this team's mailing list yet.
418418
419If it had subscribers, though, they'd be shown on that page, in a batched419If it had subscribers, though, they'd be shown on that page, in a batched
@@ -439,15 +439,15 @@ list.
439 >>> rosetta_admins.mailing_list.subscribe(jordi)439 >>> rosetta_admins.mailing_list.subscribe(jordi)
440 >>> logout()440 >>> logout()
441 >>> carlos_browser.reload()441 >>> carlos_browser.reload()
442 >>> print extract_text(442 >>> print(extract_text(
443 ... find_tag_by_id(carlos_browser.contents, 'subscribers'))443 ... find_tag_by_id(carlos_browser.contents, 'subscribers')))
444 The following people are subscribed...444 The following people are subscribed...
445 Guilherme Salgado445 Guilherme Salgado
446 1 of 2 results...446 1 of 2 results...
447447
448 >>> carlos_browser.getLink('Next').click()448 >>> carlos_browser.getLink('Next').click()
449 >>> print extract_text(449 >>> print(extract_text(
450 ... find_tag_by_id(carlos_browser.contents, 'subscribers'))450 ... find_tag_by_id(carlos_browser.contents, 'subscribers')))
451 The following people are subscribed...451 The following people are subscribed...
452 Jordi Mallach452 Jordi Mallach
453 2 of 2 results...453 2 of 2 results...
@@ -474,7 +474,7 @@ list based on a setting in the person's Email preferences page.
474474
475 >>> carlos_browser.open('http://launchpad.test/~carlos')475 >>> carlos_browser.open('http://launchpad.test/~carlos')
476 >>> carlos_browser.getLink(url="+editmailinglists").click()476 >>> carlos_browser.getLink(url="+editmailinglists").click()
477 >>> print backslashreplace(carlos_browser.title)477 >>> print(backslashreplace(carlos_browser.title))
478 Change your mailing list subscriptions...478 Change your mailing list subscriptions...
479479
480Carlos's default setting, 'Ask me when I join a team', is still in place.480Carlos's default setting, 'Ask me when I join a team', is still in place.
@@ -534,8 +534,8 @@ team they are a member of creates a new mailing list. This notification
534offers them to join the new mailing list. This page informs them of this534offers them to join the new mailing list. This page informs them of this
535behaviour.535behaviour.
536536
537 >>> print extract_text(537 >>> print(extract_text(
538 ... find_tag_by_id(carlos_browser.contents, 'notification-info'))538 ... find_tag_by_id(carlos_browser.contents, 'notification-info')))
539 When a team you are a member of creates a new mailing list, you will539 When a team you are a member of creates a new mailing list, you will
540 receive an email notification offering you the opportunity to join the new540 receive an email notification offering you the opportunity to join the new
541 mailing list. Launchpad can also automatically subscribe you to a team's541 mailing list. Launchpad can also automatically subscribe you to a team's
@@ -562,10 +562,10 @@ subscription settings will see the box checked by default.
562562
563 >>> browser.open('http://launchpad.test/~rosetta-admins')563 >>> browser.open('http://launchpad.test/~rosetta-admins')
564 >>> browser.getLink('Join the team').click()564 >>> browser.getLink('Join the team').click()
565 >>> print browser.url565 >>> print(browser.url)
566 http://launchpad.test/~rosetta-admins/+join566 http://launchpad.test/~rosetta-admins/+join
567567
568 >>> print browser.getControl(name='field.mailinglist_subscribe').value568 >>> print(browser.getControl(name='field.mailinglist_subscribe').value)
569 True569 True
570570
571 # Change James' setting571 # Change James' setting
@@ -578,7 +578,7 @@ subscription settings will see the box checked by default.
578578
579 >>> browser.open('http://launchpad.test/~rosetta-admins')579 >>> browser.open('http://launchpad.test/~rosetta-admins')
580 >>> browser.getLink('Join the team').click()580 >>> browser.getLink('Join the team').click()
581 >>> print browser.getControl(name='field.mailinglist_subscribe').value581 >>> print(browser.getControl(name='field.mailinglist_subscribe').value)
582 True582 True
583583
584Users who have chosen to never be auto-subscribed to mailing584Users who have chosen to never be auto-subscribed to mailing
@@ -594,8 +594,8 @@ lists will not have the box checked.
594594
595 >>> browser.open('http://launchpad.test/~rosetta-admins')595 >>> browser.open('http://launchpad.test/~rosetta-admins')
596 >>> browser.getLink('Join the team').click()596 >>> browser.getLink('Join the team').click()
597 >>> print bool(597 >>> print(bool(
598 ... browser.getControl(name='field.mailinglist_subscribe').value)598 ... browser.getControl(name='field.mailinglist_subscribe').value))
599 False599 False
600600
601 # Restore James' setting.601 # Restore James' setting.
diff --git a/lib/lp/registry/stories/mailinglists/welcome-message.txt b/lib/lp/registry/stories/mailinglists/welcome-message.txt
index 2565616..d7dd43d 100644
--- a/lib/lp/registry/stories/mailinglists/welcome-message.txt
+++ b/lib/lp/registry/stories/mailinglists/welcome-message.txt
@@ -22,7 +22,7 @@ Changes to the welcome message take effect as soon as Mailman can act on it.
2222
23 >>> user_browser.getLink('Configure mailing list').click()23 >>> user_browser.getLink('Configure mailing list').click()
24 >>> welcome_message = user_browser.getControl('Welcome message')24 >>> welcome_message = user_browser.getControl('Welcome message')
25 >>> print welcome_message.value25 >>> print(welcome_message.value)
26 Welcome to the Aardvarks.26 Welcome to the Aardvarks.
2727
28 >>> from lp.registry.tests import mailinglists_helper28 >>> from lp.registry.tests import mailinglists_helper
@@ -55,6 +55,6 @@ What if Mailman failed to apply the change?
55 >>> logout()55 >>> logout()
5656
57 >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist')57 >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist')
58 >>> print extract_text(find_tag_by_id(58 >>> print(extract_text(find_tag_by_id(
59 ... user_browser.contents, 'mailing_list_status_message').strong)59 ... user_browser.contents, 'mailing_list_status_message').strong))
60 This team's mailing list is in an inconsistent state...60 This team's mailing list is in an inconsistent state...
diff --git a/lib/lp/registry/stories/milestone/object-milestones.txt b/lib/lp/registry/stories/milestone/object-milestones.txt
index eb0efe0..5eaf227 100644
--- a/lib/lp/registry/stories/milestone/object-milestones.txt
+++ b/lib/lp/registry/stories/milestone/object-milestones.txt
@@ -46,7 +46,7 @@ Distributions
46 >>> anon_browser.url46 >>> anon_browser.url
47 'http://launchpad.test/debian/+milestones'47 'http://launchpad.test/debian/+milestones'
4848
49 >>> print all_milestones(anon_browser)49 >>> print(all_milestones(anon_browser))
50 Debian 3.1 Woody ...50 Debian 3.1 Woody ...
51 Debian 3.1-rc1 Woody ...51 Debian 3.1-rc1 Woody ...
5252
@@ -55,12 +55,12 @@ Distribution Series
55...................55...................
5656
57 >>> anon_browser.open('http://launchpad.test/debian/woody/+milestones')57 >>> anon_browser.open('http://launchpad.test/debian/woody/+milestones')
58 >>> print all_milestones(anon_browser)58 >>> print(all_milestones(anon_browser))
59 Debian 3.1 ...59 Debian 3.1 ...
60 Debian 3.1-rc1 ...60 Debian 3.1-rc1 ...
6161
62 >>> anon_browser.open('http://launchpad.test/debian/sarge/+milestones')62 >>> anon_browser.open('http://launchpad.test/debian/sarge/+milestones')
63 >>> print all_milestones(anon_browser)63 >>> print(all_milestones(anon_browser))
64 None64 None
6565
6666
@@ -75,7 +75,7 @@ counts (because they are costly to retrieve).
75 >>> anon_browser.url75 >>> anon_browser.url
76 'http://launchpad.test/firefox/+milestones'76 'http://launchpad.test/firefox/+milestones'
7777
78 >>> print all_milestones(anon_browser)78 >>> print(all_milestones(anon_browser))
79 Mozilla Firefox 1.0.0 "First Stable Release" 1.0 None ...79 Mozilla Firefox 1.0.0 "First Stable Release" 1.0 None ...
80 Mozilla Firefox 0.9.2 "One (secure) Tree Hill" trunk None ...80 Mozilla Firefox 0.9.2 "One (secure) Tree Hill" trunk None ...
81 Mozilla Firefox 0.9.1 "One Tree Hill (v2)" trunk None ...81 Mozilla Firefox 0.9.1 "One Tree Hill (v2)" trunk None ...
@@ -88,7 +88,7 @@ link to the project groups's milestone's page.
8888
89 >>> anon_browser.getLink(89 >>> anon_browser.getLink(
90 ... 'View milestones for The Mozilla Project').click()90 ... 'View milestones for The Mozilla Project').click()
91 >>> print anon_browser.title91 >>> print(anon_browser.title)
92 Milestones : The Mozilla Project92 Milestones : The Mozilla Project
9393
9494
@@ -96,14 +96,14 @@ Product Series
96..............96..............
9797
98 >>> anon_browser.open('http://launchpad.test/firefox/trunk/+milestones')98 >>> anon_browser.open('http://launchpad.test/firefox/trunk/+milestones')
99 >>> print all_milestones(anon_browser)99 >>> print(all_milestones(anon_browser))
100 Mozilla Firefox 0.9.2 ...100 Mozilla Firefox 0.9.2 ...
101 Mozilla Firefox 0.9.1 ...101 Mozilla Firefox 0.9.1 ...
102 Mozilla Firefox 0.9 ...102 Mozilla Firefox 0.9 ...
103 Mozilla Firefox 1.0 ...103 Mozilla Firefox 1.0 ...
104104
105 >>> anon_browser.open('http://launchpad.test/firefox/1.0/+milestones')105 >>> anon_browser.open('http://launchpad.test/firefox/1.0/+milestones')
106 >>> print all_milestones(anon_browser)106 >>> print(all_milestones(anon_browser))
107 Mozilla Firefox 1.0.0 ...107 Mozilla Firefox 1.0.0 ...
108108
109109
@@ -123,7 +123,7 @@ the bug and blueprint counts (because they are costly to retrieve).
123 >>> logout()123 >>> logout()
124 >>> anon_browser.open('http://launchpad.test/gnome')124 >>> anon_browser.open('http://launchpad.test/gnome')
125 >>> anon_browser.getLink('See all milestones').click()125 >>> anon_browser.getLink('See all milestones').click()
126 >>> print all_milestones(anon_browser)126 >>> print(all_milestones(anon_browser))
127 GNOME 2.1.6 None This is an inactive milestone127 GNOME 2.1.6 None This is an inactive milestone
128 GNOME 1.0 None This is an inactive milestone128 GNOME 1.0 None This is an inactive milestone
129 GNOME 1.3 A date This is an inactive milestone129 GNOME 1.3 A date This is an inactive milestone
@@ -139,17 +139,17 @@ Pages for the individual milestones show all specifications and bugtasks
139associated with that milestone for products of this project:139associated with that milestone for products of this project:
140140
141 >>> anon_browser.getLink('1.1', index=1).click()141 >>> anon_browser.getLink('1.1', index=1).click()
142 >>> print anon_browser.title142 >>> print(anon_browser.title)
143 1.1 : GNOME143 1.1 : GNOME
144144
145 >>> specs = find_tag_by_id(anon_browser.contents, 'milestone_specs')145 >>> specs = find_tag_by_id(anon_browser.contents, 'milestone_specs')
146 >>> print extract_text(specs)146 >>> print(extract_text(specs))
147 Blueprint Project Priority Assignee Delivery147 Blueprint Project Priority Assignee Delivery
148 Title evolution specification Evolution High Unknown148 Title evolution specification Evolution High Unknown
149 Title gnomebaker specification gnomebaker High Unknown149 Title gnomebaker specification gnomebaker High Unknown
150150
151 >>> bugtasks = find_tag_by_id(anon_browser.contents, 'milestone_bugtasks')151 >>> bugtasks = find_tag_by_id(anon_browser.contents, 'milestone_bugtasks')
152 >>> print extract_text(bugtasks)152 >>> print(extract_text(bugtasks))
153 Bug report Project Importance Assignee Status ...153 Bug report Project Importance Assignee Status ...
154 Milestone test bug for evolution Evolution Undecided Confirmed ...154 Milestone test bug for evolution Evolution Undecided Confirmed ...
155 Milestone test bug for gnomebaker gnomebaker Undecided Confirmed ...155 Milestone test bug for gnomebaker gnomebaker Undecided Confirmed ...
@@ -158,7 +158,7 @@ associated with that milestone for products of this project:
158A project milestone page has the same navigation as the project:158A project milestone page has the same navigation as the project:
159159
160 >>> anon_browser.open('http://launchpad.test/firefox/+milestone/1.0')160 >>> anon_browser.open('http://launchpad.test/firefox/+milestone/1.0')
161 >>> print anon_browser.title161 >>> print(anon_browser.title)
162 1.0 : Mozilla Firefox162 1.0 : Mozilla Firefox
163163
164 >>> print_location(anon_browser.contents)164 >>> print_location(anon_browser.contents)
@@ -176,7 +176,7 @@ Similarly, a distribution milestone page has the same navigation as the
176distribution:176distribution:
177177
178 >>> anon_browser.open('http://launchpad.test/debian/+milestone/3.1')178 >>> anon_browser.open('http://launchpad.test/debian/+milestone/3.1')
179 >>> print anon_browser.title179 >>> print(anon_browser.title)
180 3.1 : Debian180 3.1 : Debian
181181
182 >>> print_location(anon_browser.contents)182 >>> print_location(anon_browser.contents)
@@ -251,42 +251,42 @@ Mozilla Firefox product, to complement the existing series "1.0":
251251
252 >>> browser.open('http://launchpad.test/firefox')252 >>> browser.open('http://launchpad.test/firefox')
253 >>> browser.getLink('Register a series').click()253 >>> browser.getLink('Register a series').click()
254 >>> print browser.title254 >>> print(browser.title)
255 Register a new Mozilla Firefox release series...255 Register a new Mozilla Firefox release series...
256256
257 >>> browser.getControl('Name').value = '2.0'257 >>> browser.getControl('Name').value = '2.0'
258 >>> browser.getControl('Summary').value = 'The Firefox 2.0 Series'258 >>> browser.getControl('Summary').value = 'The Firefox 2.0 Series'
259 >>> browser.getControl('Register Series').click()259 >>> browser.getControl('Register Series').click()
260 >>> print browser.title260 >>> print(browser.title)
261 Series 2.0 : Mozilla Firefox261 Series 2.0 : Mozilla Firefox
262262
263We'll also create a new test milestone within the "trunk" series:263We'll also create a new test milestone within the "trunk" series:
264264
265 >>> browser.open('http://launchpad.test/firefox/trunk')265 >>> browser.open('http://launchpad.test/firefox/trunk')
266 >>> print browser.title266 >>> print(browser.title)
267 Series trunk : Mozilla Firefox267 Series trunk : Mozilla Firefox
268268
269 >>> browser.getLink('Create milestone').click()269 >>> browser.getLink('Create milestone').click()
270 >>> print browser.title270 >>> print(browser.title)
271 Register a new milestone...271 Register a new milestone...
272272
273 >>> milestone = 'test-milestone'273 >>> milestone = 'test-milestone'
274 >>> browser.getControl('Name').value = milestone274 >>> browser.getControl('Name').value = milestone
275 >>> browser.getControl('Date Targeted').value = '2100-08-08'275 >>> browser.getControl('Date Targeted').value = '2100-08-08'
276 >>> browser.getControl('Register Milestone').click()276 >>> browser.getControl('Register Milestone').click()
277 >>> print browser.title277 >>> print(browser.title)
278 Series trunk : Mozilla Firefox278 Series trunk : Mozilla Firefox
279279
280 >>> browser.open('http://launchpad.test/firefox/trunk')280 >>> browser.open('http://launchpad.test/firefox/trunk')
281281
282 >>> print extract_text(find_tag_by_id(browser.contents, 'series-trunk'))282 >>> print(extract_text(find_tag_by_id(browser.contents, 'series-trunk')))
283 Version Expected Released Summary283 Version Expected Released Summary
284 Mozilla Firefox 0.9.2... Set date Change details 2004-10-16 ...284 Mozilla Firefox 0.9.2... Set date Change details 2004-10-16 ...
285 Mozilla Firefox... Set date Change details 2004-10-16 ...285 Mozilla Firefox... Set date Change details 2004-10-16 ...
286 Mozilla Firefox test-milestone 2100-08-08 Release now ...286 Mozilla Firefox test-milestone 2100-08-08 Release now ...
287287
288 >>> browser.getLink('test-milestone').click()288 >>> browser.getLink('test-milestone').click()
289 >>> print browser.title289 >>> print(browser.title)
290 test-milestone : Mozilla Firefox290 test-milestone : Mozilla Firefox
291291
292 >>> milestone_url = browser.url292 >>> milestone_url = browser.url
@@ -295,11 +295,11 @@ Let's target an existing bug to both series "1.0" and series "2.0":
295295
296 >>> from lp.services.helpers import backslashreplace296 >>> from lp.services.helpers import backslashreplace
297 >>> browser.open(bug_1_url)297 >>> browser.open(bug_1_url)
298 >>> print backslashreplace(browser.title)298 >>> print(backslashreplace(browser.title))
299 Bug #...Test Bug 1... : Bugs : Mozilla Firefox299 Bug #...Test Bug 1... : Bugs : Mozilla Firefox
300300
301 >>> browser.getLink('Target to series').click()301 >>> browser.getLink('Target to series').click()
302 >>> print browser.title302 >>> print(browser.title)
303 Target bug #... to series...303 Target bug #... to series...
304304
305 >>> browser.getControl('1.0').selected = True305 >>> browser.getControl('1.0').selected = True
@@ -308,7 +308,7 @@ Let's target an existing bug to both series "1.0" and series "2.0":
308308
309The bug page now lists a bug task for each series:309The bug page now lists a bug task for each series:
310310
311 >>> print extract_text(first_tag_by_class(browser.contents, 'listing'))311 >>> print(extract_text(first_tag_by_class(browser.contents, 'listing')))
312 Affects Status Importance ...312 Affects Status Importance ...
313 1.0 ... New Undecided ...313 1.0 ... New Undecided ...
314 2.0 ... New Undecided ...314 2.0 ... New Undecided ...
@@ -332,7 +332,7 @@ milestone:
332 >>> browser.getControl('Importance').value = ['Critical']332 >>> browser.getControl('Importance').value = ['Critical']
333 >>> browser.getControl('Save Changes').click()333 >>> browser.getControl('Save Changes').click()
334334
335 >>> print extract_text(first_tag_by_class(browser.contents, 'listing'))335 >>> print(extract_text(first_tag_by_class(browser.contents, 'listing')))
336 Affects Status Importance ...336 Affects Status Importance ...
337 1.0 ... New Critical ...337 1.0 ... New Critical ...
338338
@@ -345,7 +345,7 @@ method. However this time we'll use a different importance:
345 >>> browser.getControl('Importance').value = ['High']345 >>> browser.getControl('Importance').value = ['High']
346 >>> browser.getControl('Save Changes').click()346 >>> browser.getControl('Save Changes').click()
347347
348 >>> print extract_text(first_tag_by_class(browser.contents, 'listing'))348 >>> print(extract_text(first_tag_by_class(browser.contents, 'listing')))
349 Affects Status Importance ...349 Affects Status Importance ...
350 2.0 ... New High ...350 2.0 ... New High ...
351351
@@ -354,14 +354,14 @@ listing:
354354
355 >>> browser.open(milestone_url)355 >>> browser.open(milestone_url)
356 >>> bug_table = find_tag_by_id(browser.contents, 'milestone_bugtasks')356 >>> bug_table = find_tag_by_id(browser.contents, 'milestone_bugtasks')
357 >>> print extract_text(bug_table )357 >>> print(extract_text(bug_table ))
358 Bug report Importance Assignee Status358 Bug report Importance Assignee Status
359 #... Test Bug 1 Critical New359 #... Test Bug 1 Critical New
360 #... Test Bug 1 High New360 #... Test Bug 1 High New
361361
362Each bugtask has one or more badges.362Each bugtask has one or more badges.
363363
364 >>> print bug_table.findAll('tr')[1]364 >>> print(bug_table.findAll('tr')[1])
365 <tr>...Test Bug 1...<a...alt="milestone test-milestone"...365 <tr>...Test Bug 1...<a...alt="milestone test-milestone"...
366 class="sprite milestone"...>...366 class="sprite milestone"...>...
367367
@@ -382,8 +382,8 @@ that milestone's bug listing:
382 >>> browser.getControl('Save Changes').click()382 >>> browser.getControl('Save Changes').click()
383383
384 >>> browser.open(milestone_url)384 >>> browser.open(milestone_url)
385 >>> print extract_text(find_tag_by_id(browser.contents,385 >>> print(extract_text(find_tag_by_id(browser.contents,
386 ... 'milestone_bugtasks'))386 ... 'milestone_bugtasks')))
387 Bug report...387 Bug report...
388 Test Bug 2...388 Test Bug 2...
389389
@@ -392,25 +392,25 @@ bug still appears in the milestone's bug listing:
392392
393 >>> browser.open(bug_2_url)393 >>> browser.open(bug_2_url)
394 >>> browser.getLink('Target to series').click()394 >>> browser.getLink('Target to series').click()
395 >>> print browser.url395 >>> print(browser.url)
396 http://bugs.launchpad.test/firefox/+bug/.../+nominate396 http://bugs.launchpad.test/firefox/+bug/.../+nominate
397397
398 >>> browser.getControl('Trunk').selected = True398 >>> browser.getControl('Trunk').selected = True
399 >>> browser.getControl('Target').click()399 >>> browser.getControl('Target').click()
400 >>> print extract_text(first_tag_by_class(browser.contents, 'listing'))400 >>> print(extract_text(first_tag_by_class(browser.contents, 'listing')))
401 Affects Status ...401 Affects Status ...
402 Mozilla Firefox ... Status tracked in Trunk ...402 Mozilla Firefox ... Status tracked in Trunk ...
403403
404 >>> browser.open(milestone_url)404 >>> browser.open(milestone_url)
405 >>> bugtasks = extract_text(find_tag_by_id(browser.contents,405 >>> bugtasks = extract_text(find_tag_by_id(browser.contents,
406 ... 'milestone_bugtasks'))406 ... 'milestone_bugtasks'))
407 >>> print bugtasks407 >>> print(bugtasks)
408 Bug report...408 Bug report...
409 Test Bug 2...409 Test Bug 2...
410410
411Moreover, the bug appears only once in the listing:411Moreover, the bug appears only once in the listing:
412412
413 >>> print bugtasks.count('Test Bug 2')413 >>> print(bugtasks.count('Test Bug 2'))
414 1414 1
415415
416416
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 70b52f8..d1a8eb1 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
@@ -26,8 +26,8 @@ redirect to the Ubuntu Hoary page showing the milestone we added.
26 >>> name12_browser.getControl('Register Milestone').click()26 >>> name12_browser.getControl('Register Milestone').click()
27 >>> name12_browser.url27 >>> name12_browser.url
28 'http://launchpad.test/ubuntu/hoary'28 'http://launchpad.test/ubuntu/hoary'
29 >>> print extract_text(29 >>> print(extract_text(
30 ... find_tag_by_id(name12_browser.contents, 'series-hoary'))30 ... find_tag_by_id(name12_browser.contents, 'series-hoary')))
31 Version ...31 Version ...
32 sounder01 ...32 sounder01 ...
3333
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 a6159c8..2a229aa 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
@@ -70,9 +70,9 @@ can create structural bug subscriptions.
7070
71 >>> user_browser.open('http://launchpad.test/firefox/+milestone/1.0')71 >>> user_browser.open('http://launchpad.test/firefox/+milestone/1.0')
72 >>> user_browser.getLink('Subscribe to bug mail').click()72 >>> user_browser.getLink('Subscribe to bug mail').click()
73 >>> print user_browser.url73 >>> print(user_browser.url)
74 http://launchpad.test/firefox/+milestone/1.0/+subscribe74 http://launchpad.test/firefox/+milestone/1.0/+subscribe
75 >>> print user_browser.title75 >>> print(user_browser.title)
76 Subscribe : 1.0 : Bugs : Mozilla Firefox76 Subscribe : 1.0 : Bugs : Mozilla Firefox
7777
78But we can't subscribe to project milestones, since they are not real objects.78But we can't subscribe to project milestones, since they are not real objects.
@@ -91,10 +91,10 @@ the series.
9191
92 >>> driver_browser = setupBrowser(auth='Basic test@canonical.com:test')92 >>> driver_browser = setupBrowser(auth='Basic test@canonical.com:test')
93 >>> driver_browser.open('http://launchpad.test/firefox/trunk')93 >>> driver_browser.open('http://launchpad.test/firefox/trunk')
94 >>> print driver_browser.title94 >>> print(driver_browser.title)
95 Series trunk : Mozilla Firefox95 Series trunk : Mozilla Firefox
96 >>> print extract_text(find_tag_by_id(96 >>> print(extract_text(find_tag_by_id(
97 ... driver_browser.contents, 'series-trunk'))97 ... driver_browser.contents, 'series-trunk')))
98 Version Expected Released Summary98 Version Expected Released Summary
99 Mozilla Firefox 0.9.2... Set date Change details 2004-10-1699 Mozilla Firefox 0.9.2... Set date Change details 2004-10-16
100 ...100 ...
@@ -109,17 +109,17 @@ A user with launchpad.Edit rights for a release can see the delete link and
109access the delete page. Sample Person is the driver so they have those rights.109access the delete page. Sample Person is the driver so they have those rights.
110110
111 >>> driver_browser.getLink('0.9.2').click()111 >>> driver_browser.getLink('0.9.2').click()
112 >>> print driver_browser.title112 >>> print(driver_browser.title)
113 0.9.2 "One (secure) Tree Hill" : Mozilla Firefox113 0.9.2 "One (secure) Tree Hill" : Mozilla Firefox
114114
115 >>> driver_browser.getLink('Delete milestone').click()115 >>> driver_browser.getLink('Delete milestone').click()
116 >>> print driver_browser.title116 >>> print(driver_browser.title)
117 Delete Mozilla Firefox 0.9.2...117 Delete Mozilla Firefox 0.9.2...
118118
119The 0.9.2 release has a release and files associated with it. Sample119The 0.9.2 release has a release and files associated with it. Sample
120Person reads that they will be deleted too.120Person reads that they will be deleted too.
121121
122 >>> print extract_text(find_main_content(driver_browser.contents))122 >>> print(extract_text(find_main_content(driver_browser.contents)))
123 Delete Mozilla Firefox 0.9.2 "One (secure) Tree Hill"123 Delete Mozilla Firefox 0.9.2 "One (secure) Tree Hill"
124 ...124 ...
125 The associated 0.9.2 release "One (secure) Tree Hill" and its files125 The associated 0.9.2 release "One (secure) Tree Hill" and its files
@@ -130,13 +130,13 @@ Sample Person chooses the delete button, then reads that the action is
130successful.130successful.
131131
132 >>> driver_browser.getControl('Delete Milestone').click()132 >>> driver_browser.getControl('Delete Milestone').click()
133 >>> print driver_browser.title133 >>> print(driver_browser.title)
134 Series trunk : Mozilla Firefox134 Series trunk : Mozilla Firefox
135135
136 >>> print_feedback_messages(driver_browser.contents)136 >>> print_feedback_messages(driver_browser.contents)
137 Milestone 0.9.2 deleted.137 Milestone 0.9.2 deleted.
138 >>> print extract_text(find_tag_by_id(138 >>> print(extract_text(find_tag_by_id(
139 ... driver_browser.contents, 'series-trunk'))139 ... driver_browser.contents, 'series-trunk')))
140 Version Expected Released Summary140 Version Expected Released Summary
141 Mozilla Firefox 0.9.1 ...141 Mozilla Firefox 0.9.1 ...
142 Mozilla Firefox 0.9 ...142 Mozilla Firefox 0.9 ...
diff --git a/lib/lp/registry/stories/milestone/xx-milestone-description.txt b/lib/lp/registry/stories/milestone/xx-milestone-description.txt
index 27db913..d131f2b 100644
--- a/lib/lp/registry/stories/milestone/xx-milestone-description.txt
+++ b/lib/lp/registry/stories/milestone/xx-milestone-description.txt
@@ -28,7 +28,7 @@ The summary appears on the milestone index page.
2828
29 >>> test_browser.open('http://launchpad.test/ubuntu/+milestone/milestone1')29 >>> test_browser.open('http://launchpad.test/ubuntu/+milestone/milestone1')
30 >>> tag = find_tag_by_id(test_browser.contents, 'description')30 >>> tag = find_tag_by_id(test_browser.contents, 'description')
31 >>> print extract_text(tag)31 >>> print(extract_text(tag))
32 Summary of first Ubuntu milestone.32 Summary of first Ubuntu milestone.
3333
34We can edit the summary after creating the milestone.34We can edit the summary after creating the milestone.
@@ -43,7 +43,7 @@ And see that it is indeed modified on the milestone page.
4343
44 >>> test_browser.open('http://launchpad.test/ubuntu/+milestone/milestone1')44 >>> test_browser.open('http://launchpad.test/ubuntu/+milestone/milestone1')
45 >>> tag = find_tag_by_id(test_browser.contents, 'description')45 >>> tag = find_tag_by_id(test_browser.contents, 'description')
46 >>> print extract_text(tag)46 >>> print(extract_text(tag))
47 Modified summary of first Ubuntu milestone.47 Modified summary of first Ubuntu milestone.
4848
4949
@@ -63,7 +63,7 @@ The summary appears on the milestone index page.
63 >>> test_browser.open(63 >>> test_browser.open(
64 ... 'http://launchpad.test/alsa-utils/+milestone/milestone1')64 ... 'http://launchpad.test/alsa-utils/+milestone/milestone1')
65 >>> tag = find_tag_by_id(test_browser.contents, 'description')65 >>> tag = find_tag_by_id(test_browser.contents, 'description')
66 >>> print extract_text(tag)66 >>> print(extract_text(tag))
67 Summary of first alsa-utils milestone.67 Summary of first alsa-utils milestone.
6868
69We can edit the summary after creating the milestone.69We can edit the summary after creating the milestone.
@@ -79,5 +79,5 @@ And see that it is indeed modified on the milestone page.
79 >>> test_browser.open(79 >>> test_browser.open(
80 ... 'http://launchpad.test/alsa-utils/+milestone/milestone1')80 ... 'http://launchpad.test/alsa-utils/+milestone/milestone1')
81 >>> tag = find_tag_by_id(test_browser.contents, 'description')81 >>> tag = find_tag_by_id(test_browser.contents, 'description')
82 >>> print extract_text(tag)82 >>> print(extract_text(tag))
83 Modified summary of first alsa-utils milestone.83 Modified summary of first alsa-utils milestone.
diff --git a/lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt b/lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt
index cacfde8..1e99a5e 100644
--- a/lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt
+++ b/lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt
@@ -19,7 +19,7 @@ The top contributors page can be reached from the top contributors portlet.
19 True19 True
2020
21 >>> anon_browser.getLink('More contributors').click()21 >>> anon_browser.getLink('More contributors').click()
22 >>> print anon_browser.title22 >>> print(anon_browser.title)
23 Top Ubuntu Contributors...23 Top Ubuntu Contributors...
2424
2525
@@ -34,7 +34,7 @@ The top contributors page can be reached from the top contributors portlet.
34 True34 True
3535
36 >>> anon_browser.getLink('More contributors').click()36 >>> anon_browser.getLink('More contributors').click()
37 >>> print anon_browser.title37 >>> print(anon_browser.title)
38 Top Mozilla Firefox Contributors...38 Top Mozilla Firefox Contributors...
3939
4040
@@ -49,5 +49,5 @@ The top contributors page can be reached from the top contributors portlet.
49 True49 True
5050
51 >>> anon_browser.getLink('More contributors').click()51 >>> anon_browser.getLink('More contributors').click()
52 >>> print anon_browser.title52 >>> print(anon_browser.title)
53 Top The Mozilla Project Contributors...53 Top The Mozilla Project Contributors...
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 746dcc6..dcccb46 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
@@ -22,9 +22,9 @@ deletion succeeds and the usual informational message is displayed.
22 >>> first_browser.getControl('Unlink').click()22 >>> first_browser.getControl('Unlink').click()
23 >>> content = first_browser.contents23 >>> content = first_browser.contents
24 >>> for tag in find_tags_by_class(content, 'error'):24 >>> for tag in find_tags_by_class(content, 'error'):
25 ... print extract_text(tag)25 ... print(extract_text(tag))
26 >>> for tag in find_tags_by_class(content, 'informational'):26 >>> for tag in find_tags_by_class(content, 'informational'):
27 ... print extract_text(tag)27 ... print(extract_text(tag))
28 Removed upstream association between alsa-utils trunk series and Warty.28 Removed upstream association between alsa-utils trunk series and Warty.
2929
30A few minutes later, the user sees the same packaging association in the30A few minutes later, the user sees the same packaging association in the
@@ -37,7 +37,7 @@ succeed.
37 ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging').click()37 ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging').click()
38 >>> content = second_browser.contents38 >>> content = second_browser.contents
39 >>> for tag in find_tags_by_class(content, 'informational'):39 >>> for tag in find_tags_by_class(content, 'informational'):
40 ... print extract_text(tag)40 ... print(extract_text(tag))
41 >>> for tag in find_tags_by_class(content, 'error'):41 >>> for tag in find_tags_by_class(content, 'error'):
42 ... print extract_text(tag)42 ... print(extract_text(tag))
43 This upstream association was deleted already.43 This upstream association was deleted already.
diff --git a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt
index ca22f47..a1f0e86 100644
--- a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt
+++ b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt
@@ -8,7 +8,7 @@ Any user can see the summary of the binaries built from the current version
8of the package.8of the package.
99
10 >>> anon_browser.open('http://launchpad.test/ubuntu/+source/pmount')10 >>> anon_browser.open('http://launchpad.test/ubuntu/+source/pmount')
11 >>> print extract_text(find_tag_by_id(anon_browser.contents, 'summary'))11 >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'summary')))
12 pmount: pmount shortdesc12 pmount: pmount shortdesc
1313
14This page includes a table that lists all the releases of this source14This page includes a table that lists all the releases of this source
@@ -17,7 +17,7 @@ source package in each series of this distribution.
1717
18 >>> anon_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils')18 >>> anon_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils')
19 >>> content = anon_browser.contents19 >>> content = anon_browser.contents
20 >>> print extract_text(find_tag_by_id(content, 'packages_list'))20 >>> print(extract_text(find_tag_by_id(content, 'packages_list')))
21 The Hoary Hedgehog Release (active development) Set upstream link21 The Hoary Hedgehog Release (active development) Set upstream link
22 1.0.9a-4ubuntu1 release (main) 2005-09-1522 1.0.9a-4ubuntu1 release (main) 2005-09-15
23 The Warty Warthog Release (current stable release) alsa-utils trunk series23 The Warty Warthog Release (current stable release) alsa-utils trunk series
@@ -35,7 +35,7 @@ packaging links.
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/warty/+source/alsa-utils/+remove-packaging')
38 >>> print link38 >>> print(link)
39 <Link text='Remove upstream link'...39 <Link text='Remove upstream link'...
4040
41This button is not displayed to anonymous users.41This button is not displayed to anonymous users.
@@ -54,11 +54,11 @@ Clicking this button deletes the corresponding packaging association.
54 >>> user_browser.getControl('Unlink').click()54 >>> user_browser.getControl('Unlink').click()
55 >>> content = user_browser.contents55 >>> content = user_browser.contents
56 >>> for tag in find_tags_by_class(content, 'error'):56 >>> for tag in find_tags_by_class(content, 'error'):
57 ... print extract_text(tag)57 ... print(extract_text(tag))
58 >>> for tag in find_tags_by_class(content, 'informational'):58 >>> for tag in find_tags_by_class(content, 'informational'):
59 ... print extract_text(tag)59 ... print(extract_text(tag))
60 Removed upstream association between alsa-utils trunk series and Warty.60 Removed upstream association between alsa-utils trunk series and Warty.
61 >>> print extract_text(find_tag_by_id(content, 'packages_list'))61 >>> print(extract_text(find_tag_by_id(content, 'packages_list')))
62 The Hoary Hedgehog Release (active development) Set upstream link62 The Hoary Hedgehog Release (active development) Set upstream link
63 1.0.9a-4ubuntu1 release (main) 2005-09-1563 1.0.9a-4ubuntu1 release (main) 2005-09-15
64 The Warty Warthog Release (current stable release) Set upstream link64 The Warty Warthog Release (current stable release) Set upstream link
diff --git a/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt b/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt
index 7f33abc..0457b89 100644
--- a/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt
+++ b/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt
@@ -15,7 +15,7 @@ and 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/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 ...
2121
@@ -23,8 +23,8 @@ They look at the pmount source package page in Hoary and read that the
23upstream project is not set.23upstream project is not set.
2424
25 >>> user_browser.getLink('pmount').click()25 >>> user_browser.getLink('pmount').click()
26 >>> print extract_text(find_tag_by_id(26 >>> print(extract_text(find_tag_by_id(
27 ... user_browser.contents, 'no-upstreams'))27 ... user_browser.contents, 'no-upstreams')))
28 Launchpad...28 Launchpad...
29 There are no projects registered in Launchpad that are a potential29 There are no projects registered in Launchpad that are a potential
30 match for this source package. Can you help us find one?30 match for this source package. Can you help us find one?
@@ -42,16 +42,16 @@ project. They set the upstream packaging link and see that it is set.
42 >>> user_browser.getControl('Continue').click()42 >>> user_browser.getControl('Continue').click()
43 >>> user_browser.getControl(name='field.productseries').value = ['trunk']43 >>> user_browser.getControl(name='field.productseries').value = ['trunk']
44 >>> user_browser.getControl("Change").click()44 >>> user_browser.getControl("Change").click()
45 >>> print extract_text(find_tag_by_id(45 >>> print(extract_text(find_tag_by_id(
46 ... user_browser.contents, 'upstreams'))46 ... user_browser.contents, 'upstreams')))
47 The Mozilla Project...Mozilla Thunderbird...trunk...47 The Mozilla Project...Mozilla Thunderbird...trunk...
4848
49They see the "Show upstream links" link and take a look at the project's49They see the "Show upstream links" link and take a look at the project's
50packaging in distributions.50packaging in distributions.
5151
52 >>> user_browser.getLink('Show upstream links').click()52 >>> user_browser.getLink('Show upstream links').click()
53 >>> print extract_text(53 >>> print(extract_text(
54 ... find_tag_by_id(user_browser.contents, 'distribution-series'))54 ... find_tag_by_id(user_browser.contents, 'distribution-series')))
55 Distribution series Source package Version Project series55 Distribution series Source package Version Project series
56 Hoary (5.04) pmount 0.1-2 Mozilla Thunderbird trunk...56 Hoary (5.04) pmount 0.1-2 Mozilla Thunderbird trunk...
5757
@@ -61,8 +61,8 @@ link to all versions and follows it to the distro source package page.
61 >>> user_browser.getLink('pmount').click()61 >>> user_browser.getLink('pmount').click()
62 >>> user_browser.getLink(62 >>> user_browser.getLink(
63 ... 'All versions of pmount source in Ubuntu').click()63 ... 'All versions of pmount source in Ubuntu').click()
64 >>> print extract_text(find_tag_by_id(64 >>> print(extract_text(find_tag_by_id(
65 ... user_browser.contents, 'packages_list'))65 ... user_browser.contents, 'packages_list')))
66 The Hoary Hedgehog Release (active development) ...66 The Hoary Hedgehog Release (active development) ...
67 0.1-2 release (main) 2005-08-2467 0.1-2 release (main) 2005-08-24
6868
@@ -79,15 +79,15 @@ step of the multistep form.
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()
82 >>> print user_browser.getControl(name='field.name').value82 >>> print(user_browser.getControl(name='field.name').value)
83 bonkers83 bonkers
84 >>> print user_browser.getControl(name='field.display_name').value84 >>> print(user_browser.getControl(name='field.display_name').value)
85 Bonkers85 Bonkers
86 >>> print user_browser.getControl(name='field.summary').value86 >>> print(user_browser.getControl(name='field.summary').value)
87 summary for flubber-bin87 summary for flubber-bin
88 summary for flubber-lib88 summary for flubber-lib
89 >>> print extract_text(89 >>> print(extract_text(
90 ... find_tag_by_id(user_browser.contents, 'step-title'))90 ... find_tag_by_id(user_browser.contents, 'step-title')))
91 Step 2 (of 2): Check for duplicate projects91 Step 2 (of 2): Check for duplicate projects
9292
93When No Privileges Person selects "Choose another upstream project" and93When No Privileges Person selects "Choose another upstream project" and
@@ -99,19 +99,19 @@ then finds out that the project doesn't exist, they use the
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.url102 >>> print(user_browser.url)
103 http://launchpad.test/youbuntu/busy/+source/bonkers/+edit-packaging103 http://launchpad.test/youbuntu/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').value106 >>> print(user_browser.getControl(name='field.name').value)
107 bonkers107 bonkers
108 >>> print user_browser.getControl(name='field.display_name').value108 >>> print(user_browser.getControl(name='field.display_name').value)
109 Bonkers109 Bonkers
110 >>> print user_browser.getControl(name='field.summary').value110 >>> print(user_browser.getControl(name='field.summary').value)
111 summary for flubber-bin111 summary for flubber-bin
112 summary for flubber-lib112 summary for flubber-lib
113 >>> print extract_text(113 >>> print(extract_text(
114 ... find_tag_by_id(user_browser.contents, 'step-title'))114 ... find_tag_by_id(user_browser.contents, 'step-title')))
115 Step 2 (of 2): Check for duplicate projects115 Step 2 (of 2): Check for duplicate projects
116116
117After No Privileges Person selects the licences, the user is redirected back117After No Privileges Person selects the licences, the user is redirected back
@@ -120,14 +120,14 @@ to the source package page and an informational message will be displayed.
120 >>> user_browser.getControl(name='field.licenses').value = ['BSD']120 >>> user_browser.getControl(name='field.licenses').value = ['BSD']
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.url123 >>> print(user_browser.url)
124 http://launchpad.test/youbuntu/busy/+source/bonkers124 http://launchpad.test/youbuntu/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))
128 Linked Bonkers project to bonkers source package.128 Linked Bonkers project to bonkers source package.
129 >>> print extract_text(129 >>> print(extract_text(
130 ... find_tag_by_id(user_browser.contents, 'upstreams'))130 ... find_tag_by_id(user_browser.contents, 'upstreams')))
131 Bonkers ā‡’ trunk131 Bonkers ā‡’ trunk
132 Change upstream link132 Change upstream link
133 Remove upstream link...133 Remove upstream link...
diff --git a/lib/lp/registry/stories/person/xx-add-sshkey.txt b/lib/lp/registry/stories/person/xx-add-sshkey.txt
index f3d42bc..47e4140 100644
--- a/lib/lp/registry/stories/person/xx-add-sshkey.txt
+++ b/lib/lp/registry/stories/person/xx-add-sshkey.txt
@@ -11,19 +11,19 @@ Profile page
11User keys are shown on profile pages, and any user can see that.11User keys are shown on profile pages, and any user can see that.
1212
13 >>> anon_browser.open('http://launchpad.test/~name12')13 >>> anon_browser.open('http://launchpad.test/~name12')
14 >>> print anon_browser.title14 >>> print(anon_browser.title)
15 Sample Person in Launchpad15 Sample Person in Launchpad
16 >>> print extract_text(16 >>> print(extract_text(
17 ... find_tag_by_id(anon_browser.contents, 'sshkeys'))17 ... find_tag_by_id(anon_browser.contents, 'sshkeys')))
18 SSH keys: andrew@trogdor18 SSH keys: andrew@trogdor
1919
20Salgado does not have a key, so we omit the 'SSH keys' section for anonymous20Salgado does not have a key, so we omit the 'SSH keys' section for anonymous
21users.21users.
2222
23 >>> anon_browser.open('http://launchpad.test/~salgado')23 >>> anon_browser.open('http://launchpad.test/~salgado')
24 >>> print anon_browser.title24 >>> print(anon_browser.title)
25 Guilherme Salgado in Launchpad25 Guilherme Salgado in Launchpad
26 >>> print find_tag_by_id(anon_browser.contents, 'sshkeys')26 >>> print(find_tag_by_id(anon_browser.contents, 'sshkeys'))
27 None27 None
2828
29Salgado sees a message explaining that he can register his ssh key.29Salgado sees a message explaining that he can register his ssh key.
@@ -37,10 +37,10 @@ Salgado sees a message explaining that he can register his ssh key.
37 >>> logout()37 >>> logout()
38 >>> browser = setupBrowserFreshLogin(salgado)38 >>> browser = setupBrowserFreshLogin(salgado)
39 >>> browser.open('http://launchpad.test/~salgado')39 >>> browser.open('http://launchpad.test/~salgado')
40 >>> print browser.title40 >>> print(browser.title)
41 Guilherme Salgado in Launchpad41 Guilherme Salgado in Launchpad
42 >>> print extract_text(42 >>> print(extract_text(
43 ... find_tag_by_id(browser.contents, 'sshkeys'))43 ... find_tag_by_id(browser.contents, 'sshkeys')))
44 SSH keys: Add an SSH key44 SSH keys: Add an SSH key
45 No SSH keys registered.45 No SSH keys registered.
4646
@@ -53,7 +53,7 @@ an already uploaded one. Salgado sees a link on his profile page to update
53his SSH keys. The page allows him to add a key.53his SSH keys. The page allows him to add a key.
5454
55 >>> browser.getLink('Add an SSH key').click()55 >>> browser.getLink('Add an SSH key').click()
56 >>> print browser.title56 >>> print(browser.title)
57 Change your SSH keys...57 Change your SSH keys...
5858
59Any key must be of the form "keytype keytext comment", where keytype must be59Any key must be of the form "keytype keytext comment", where keytype must be
@@ -65,21 +65,21 @@ message will be shown.
65 >>> browser.getControl(name='sshkey').value = sshkey65 >>> browser.getControl(name='sshkey').value = sshkey
66 >>> browser.getControl('Import Public Key').click()66 >>> browser.getControl('Import Public Key').click()
67 >>> for tag in find_main_content(browser.contents)('p', 'error message'):67 >>> for tag in find_main_content(browser.contents)('p', 'error message'):
68 ... print tag.renderContents()68 ... print(tag.renderContents())
69 Invalid public key69 Invalid public key
7070
71 >>> sshkey = "ssh-rsa foo"71 >>> sshkey = "ssh-rsa foo"
72 >>> browser.getControl(name='sshkey').value = sshkey72 >>> browser.getControl(name='sshkey').value = sshkey
73 >>> browser.getControl('Import Public Key').click()73 >>> browser.getControl('Import Public Key').click()
74 >>> for tag in find_main_content(browser.contents)('p', 'error message'):74 >>> for tag in find_main_content(browser.contents)('p', 'error message'):
75 ... print tag.renderContents()75 ... print(tag.renderContents())
76 Invalid public key76 Invalid public key
7777
78 >>> sshkey = "ssh-xsa foo comment"78 >>> sshkey = "ssh-xsa foo comment"
79 >>> browser.getControl(name='sshkey').value = sshkey79 >>> browser.getControl(name='sshkey').value = sshkey
80 >>> browser.getControl('Import Public Key').click()80 >>> browser.getControl('Import Public Key').click()
81 >>> for tag in find_main_content(browser.contents)('p', 'error message'):81 >>> for tag in find_main_content(browser.contents)('p', 'error message'):
82 ... print tag.renderContents()82 ... print(tag.renderContents())
83 Invalid public key83 Invalid public key
8484
8585
@@ -91,7 +91,7 @@ format.
91 >>> browser.getControl('Import Public Key').click()91 >>> browser.getControl('Import Public Key').click()
92 >>> soup = find_main_content(browser.contents)92 >>> soup = find_main_content(browser.contents)
93 >>> for tag in soup('p', 'informational message'):93 >>> for tag in soup('p', 'informational message'):
94 ... print tag.renderContents()94 ... print(tag.renderContents())
95 SSH public key added.95 SSH public key added.
9696
97 >>> sshkey = "ssh-dss AAAAB3NzaC1kc3MAAAEBAObOoy3fScSSQPHE/V6tPGoFzo5y1JRjDLcs8CNcvIHh9L27Qdj6h18AXn6MUCvvSCKm49aHpp1Xe14a6fmEIesjz6VopPWGENaOwRmhH6zfqM6imKUXQ0sq9p0znYb0TMjyRC0/AmqYneUF6FA2mVXygkGAkp/vDRPFQhPwnHpVD9TVPxHBQdHgM3bTo2TT+GoL7kw/s32ZiAH4OPvN5fN7bCkQWoUs/ySfoNbISMdvdtq07Rra2Biwzgjjs0ZcKbMicbDyYCe4gXlqK4wqcDfcwgrdqdG6NM0LUdekarWjnv0pMb6ttUl4U7e7Nf+eGkiTVItlppC8DyrnqC9SKCUAAAAVAOlEYNobJottyObVWQcrU8eAP4T5AAABAQDmJmL4DcQ1GVvw1Pjy57V0WUyGrOVBRVz7BwYBIvMA7xJCCvzd47mYWrWJkjV6O3tw2vG5oZx+BXE+ve8O6jL89CrwqncoUS8WHCojRmuUHTmtCCiRBCH+/68HMCusO3Blk//kQSsaqfIn+8Xa56Vr2SweSUlLgjvb51+89JJ13oDlUvdftW2GZu+grbmojqcoJ1LVAI5n0qsDItsFid46f8XfNzPeksasY9JbY5fKq/xf1KcgXL2F9XwmrDjFCuI4/xkJWNfGwaLKC/cbrJ1xmvPLl1/Hm5kNqgrwpNwHVOwyYSCUqXroU5PnpE9uydHUhjhtU2K2Hj0i7fOyxoxyAAABAQCpXKgd6lpTAEKm7ECY3TbJaTXPkNvAwg/2ud+PrtefHrVFFWrXrblSQhnmnc6ut8G3BsDzCljAIV2v+XcdOo+m8EViLf+Bi+gfbAIz4vdVepwQ2XHWUOTKk90i7Xqg4mUUDRIVw9ioNF0GAHbNlJTK3FWC3gstbCJU2hyV3UzgB95b6zqpUHeyn1RK4VAFYGY9fCIdZNy926HEart6uO/N6cO1ETw5B63kI8fTBjU7HLGgGXRjOv1APAqvKgry3tQD2WYkVJGRyYLjDK9d8nStUpwN5swI1xx2IWAbD+UCsRXAixn8s3mvpBD/jbnWjrzEensBc96jtiAsx2P5oXEd salgado@canario"97 >>> sshkey = "ssh-dss AAAAB3NzaC1kc3MAAAEBAObOoy3fScSSQPHE/V6tPGoFzo5y1JRjDLcs8CNcvIHh9L27Qdj6h18AXn6MUCvvSCKm49aHpp1Xe14a6fmEIesjz6VopPWGENaOwRmhH6zfqM6imKUXQ0sq9p0znYb0TMjyRC0/AmqYneUF6FA2mVXygkGAkp/vDRPFQhPwnHpVD9TVPxHBQdHgM3bTo2TT+GoL7kw/s32ZiAH4OPvN5fN7bCkQWoUs/ySfoNbISMdvdtq07Rra2Biwzgjjs0ZcKbMicbDyYCe4gXlqK4wqcDfcwgrdqdG6NM0LUdekarWjnv0pMb6ttUl4U7e7Nf+eGkiTVItlppC8DyrnqC9SKCUAAAAVAOlEYNobJottyObVWQcrU8eAP4T5AAABAQDmJmL4DcQ1GVvw1Pjy57V0WUyGrOVBRVz7BwYBIvMA7xJCCvzd47mYWrWJkjV6O3tw2vG5oZx+BXE+ve8O6jL89CrwqncoUS8WHCojRmuUHTmtCCiRBCH+/68HMCusO3Blk//kQSsaqfIn+8Xa56Vr2SweSUlLgjvb51+89JJ13oDlUvdftW2GZu+grbmojqcoJ1LVAI5n0qsDItsFid46f8XfNzPeksasY9JbY5fKq/xf1KcgXL2F9XwmrDjFCuI4/xkJWNfGwaLKC/cbrJ1xmvPLl1/Hm5kNqgrwpNwHVOwyYSCUqXroU5PnpE9uydHUhjhtU2K2Hj0i7fOyxoxyAAABAQCpXKgd6lpTAEKm7ECY3TbJaTXPkNvAwg/2ud+PrtefHrVFFWrXrblSQhnmnc6ut8G3BsDzCljAIV2v+XcdOo+m8EViLf+Bi+gfbAIz4vdVepwQ2XHWUOTKk90i7Xqg4mUUDRIVw9ioNF0GAHbNlJTK3FWC3gstbCJU2hyV3UzgB95b6zqpUHeyn1RK4VAFYGY9fCIdZNy926HEart6uO/N6cO1ETw5B63kI8fTBjU7HLGgGXRjOv1APAqvKgry3tQD2WYkVJGRyYLjDK9d8nStUpwN5swI1xx2IWAbD+UCsRXAixn8s3mvpBD/jbnWjrzEensBc96jtiAsx2P5oXEd salgado@canario"
@@ -99,7 +99,7 @@ format.
99 >>> browser.getControl('Import Public Key').click()99 >>> browser.getControl('Import Public Key').click()
100 >>> soup = find_main_content(browser.contents)100 >>> soup = find_main_content(browser.contents)
101 >>> for tag in soup('p', 'informational message'):101 >>> for tag in soup('p', 'informational message'):
102 ... print tag.renderContents()102 ... print(tag.renderContents())
103 SSH public key added.103 SSH public key added.
104104
105 >>> sshkey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJseCUmxVG7D6qh4JmhLp0Du4kScScJ9PtZ0LGHYHaURnRw9tbX1wwURAio8og6dbnT75CQ3TbUE/xJhxI0aFXE= salgado@canario"105 >>> sshkey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJseCUmxVG7D6qh4JmhLp0Du4kScScJ9PtZ0LGHYHaURnRw9tbX1wwURAio8og6dbnT75CQ3TbUE/xJhxI0aFXE= salgado@canario"
@@ -107,7 +107,7 @@ format.
107 >>> browser.getControl('Import Public Key').click()107 >>> browser.getControl('Import Public Key').click()
108 >>> soup = find_main_content(browser.contents)108 >>> soup = find_main_content(browser.contents)
109 >>> for tag in soup('p', 'informational message'):109 >>> for tag in soup('p', 'informational message'):
110 ... print tag.renderContents()110 ... print(tag.renderContents())
111 SSH public key added.111 SSH public key added.
112112
113 >>> sshkey = "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBDUR0E0zCHRHJER6uzjfE/o0HAHFLcq/n8lp0duThpeIPsmo+wr3vHHuAAyOddOgkuQC8Lj8FzHlrOEYgXL6qa7FvpviE9YWUgmqVDa/yJbL/m6Mg8fvSIXlDJKmvOSv6g== salgado@canario"113 >>> sshkey = "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBDUR0E0zCHRHJER6uzjfE/o0HAHFLcq/n8lp0duThpeIPsmo+wr3vHHuAAyOddOgkuQC8Lj8FzHlrOEYgXL6qa7FvpviE9YWUgmqVDa/yJbL/m6Mg8fvSIXlDJKmvOSv6g== salgado@canario"
@@ -115,7 +115,7 @@ format.
115 >>> browser.getControl('Import Public Key').click()115 >>> browser.getControl('Import Public Key').click()
116 >>> soup = find_main_content(browser.contents)116 >>> soup = find_main_content(browser.contents)
117 >>> for tag in soup('p', 'informational message'):117 >>> for tag in soup('p', 'informational message'):
118 ... print tag.renderContents()118 ... print(tag.renderContents())
119 SSH public key added.119 SSH public key added.
120120
121 >>> sshkey = "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAB3rpD+Ozb/kwUOqCZUXSiruAkIx6sNZLJyjJ0zxVTZSannaysCLxMQ/IiVxCd59+U2NaLduMzd93JcYDRlX3M5+AApY+3JjfSPo01Sb17HTLNSYU3RZWx0A3XJxm/YN+x/iuYZ3IziuAKeYMsNsdfHlO4/IWjw4Ruy0enW+QhWaY2qAQ== salgado@canario"121 >>> sshkey = "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAB3rpD+Ozb/kwUOqCZUXSiruAkIx6sNZLJyjJ0zxVTZSannaysCLxMQ/IiVxCd59+U2NaLduMzd93JcYDRlX3M5+AApY+3JjfSPo01Sb17HTLNSYU3RZWx0A3XJxm/YN+x/iuYZ3IziuAKeYMsNsdfHlO4/IWjw4Ruy0enW+QhWaY2qAQ== salgado@canario"
@@ -123,7 +123,7 @@ format.
123 >>> browser.getControl('Import Public Key').click()123 >>> browser.getControl('Import Public Key').click()
124 >>> soup = find_main_content(browser.contents)124 >>> soup = find_main_content(browser.contents)
125 >>> for tag in soup('p', 'informational message'):125 >>> for tag in soup('p', 'informational message'):
126 ... print tag.renderContents()126 ... print(tag.renderContents())
127 SSH public key added.127 SSH public key added.
128128
129Launchpad administrators are not allowed to poke at other user's ssh keys.129Launchpad administrators are not allowed to poke at other user's ssh keys.
@@ -141,9 +141,9 @@ Salgado chooses to remove one of his ssh keys from Launchpad. The link
141to edit his keys is on the page.141to edit his keys is on the page.
142142
143 >>> browser.open('http://launchpad.test/~salgado')143 >>> browser.open('http://launchpad.test/~salgado')
144 >>> print browser.title144 >>> print(browser.title)
145 Guilherme Salgado in Launchpad145 Guilherme Salgado in Launchpad
146 >>> print extract_text(find_tag_by_id(browser.contents, 'sshkeys'))146 >>> print(extract_text(find_tag_by_id(browser.contents, 'sshkeys')))
147 SSH keys: Update SSH keys147 SSH keys: Update SSH keys
148 salgado@canario148 salgado@canario
149 salgado@canario149 salgado@canario
@@ -151,13 +151,13 @@ to edit his keys is on the page.
151 salgado@canario151 salgado@canario
152 salgado@canario152 salgado@canario
153 >>> browser.getLink('Update SSH keys').click()153 >>> browser.getLink('Update SSH keys').click()
154 >>> print browser.title154 >>> print(browser.title)
155 Change your SSH keys...155 Change your SSH keys...
156156
157 >>> browser.getControl('Remove', index=0).click()157 >>> browser.getControl('Remove', index=0).click()
158 >>> soup = find_main_content(browser.contents)158 >>> soup = find_main_content(browser.contents)
159 >>> for tag in soup('p', 'informational message'):159 >>> for tag in soup('p', 'informational message'):
160 ... print tag.renderContents()160 ... print(tag.renderContents())
161 Key ... removed161 Key ... removed
162162
163If Salgado tries to remove a key that doesn't exist or one that doesn't163If Salgado tries to remove a key that doesn't exist or one that doesn't
@@ -167,7 +167,7 @@ belong to him, it will fail with an error message.
167 >>> browser.getControl('Remove', index=0).click()167 >>> browser.getControl('Remove', index=0).click()
168 >>> soup = find_main_content(browser.contents)168 >>> soup = find_main_content(browser.contents)
169 >>> for tag in soup('p', 'error message'):169 >>> for tag in soup('p', 'error message'):
170 ... print tag.renderContents()170 ... print(tag.renderContents())
171 Cannot remove a key that doesn't exist171 Cannot remove a key that doesn't exist
172172
173 >>> browser.getControl(name='key', index=0).value = '1'173 >>> browser.getControl(name='key', index=0).value = '1'
diff --git a/lib/lp/registry/stories/person/xx-admin-person-review.txt b/lib/lp/registry/stories/person/xx-admin-person-review.txt
index 1173f52..58c7a88 100644
--- a/lib/lp/registry/stories/person/xx-admin-person-review.txt
+++ b/lib/lp/registry/stories/person/xx-admin-person-review.txt
@@ -10,10 +10,10 @@ Registry admins can review users and update some of their information.
1010
11 >>> expert_browser.open('http://launchpad.test/~salgado')11 >>> expert_browser.open('http://launchpad.test/~salgado')
12 >>> expert_browser.getLink('Administer').click()12 >>> expert_browser.getLink('Administer').click()
13 >>> print expert_browser.url13 >>> print(expert_browser.url)
14 http://launchpad.test/~salgado/+review14 http://launchpad.test/~salgado/+review
1515
16 >>> print expert_browser.title16 >>> print(expert_browser.title)
17 Review person...17 Review person...
1818
19 >>> expert_browser.getControl('Name', index=0).value = 'no-way'19 >>> expert_browser.getControl('Name', index=0).value = 'no-way'
@@ -21,7 +21,7 @@ Registry admins can review users and update some of their information.
21 >>> expert_browser.getControl(21 >>> expert_browser.getControl(
22 ... name='field.personal_standing_reason').value = 'good guy'22 ... name='field.personal_standing_reason').value = 'good guy'
23 >>> expert_browser.getControl('Change').click()23 >>> expert_browser.getControl('Change').click()
24 >>> print expert_browser.url24 >>> print(expert_browser.url)
25 http://launchpad.test/~no-way25 http://launchpad.test/~no-way
2626
27Registry experts can't change the displayname.27Registry experts can't change the displayname.
@@ -40,9 +40,9 @@ But Launchpad admins can.
40 >>> admin_browser.getControl(40 >>> admin_browser.getControl(
41 ... 'Display Name', index=0).value = 'The one and only Salgado'41 ... 'Display Name', index=0).value = 'The one and only Salgado'
42 >>> admin_browser.getControl('Change').click()42 >>> admin_browser.getControl('Change').click()
43 >>> print admin_browser.title43 >>> print(admin_browser.title)
44 The one and only Salgado in Launchpad44 The one and only Salgado in Launchpad
45 >>> print admin_browser.url45 >>> print(admin_browser.url)
46 http://launchpad.test/~salgado46 http://launchpad.test/~salgado
4747
4848
@@ -53,7 +53,7 @@ The review page has a link to the review account page.
5353
54 >>> expert_browser.open('http://launchpad.test/~salgado')54 >>> expert_browser.open('http://launchpad.test/~salgado')
55 >>> expert_browser.getLink('Administer Account').click()55 >>> expert_browser.getLink('Administer Account').click()
56 >>> print expert_browser.title56 >>> print(expert_browser.title)
57 Review person's account...57 Review person's account...
5858
59The +reviewaccount page displays account information that is normally59The +reviewaccount page displays account information that is normally
@@ -61,7 +61,7 @@ hidden from the UI.
6161
62 >>> content = find_main_content(expert_browser.contents)62 >>> content = find_main_content(expert_browser.contents)
63 >>> for tr in content.find(id='summary').findAll('tr'):63 >>> for tr in content.find(id='summary').findAll('tr'):
64 ... print extract_text(tr)64 ... print(extract_text(tr))
65 Created: 2005-06-0665 Created: 2005-06-06
66 Creation reason: Created by the owner themselves, coming from Launchpad.66 Creation reason: Created by the owner themselves, coming from Launchpad.
67 OpenID identifiers: salgado_oid67 OpenID identifiers: salgado_oid
@@ -72,5 +72,5 @@ hidden from the UI.
72The page also contains a link back to the +review page.72The page also contains a link back to the +review page.
7373
74 >>> link = expert_browser.getLink(url='+review')74 >>> link = expert_browser.getLink(url='+review')
75 >>> print link.text75 >>> print(link.text)
76 edit[IMG] Review the user's Launchpad information76 edit[IMG] Review the user's Launchpad information
diff --git a/lib/lp/registry/stories/person/xx-approve-members.txt b/lib/lp/registry/stories/person/xx-approve-members.txt
index 5e1eebc..ee879bb 100644
--- a/lib/lp/registry/stories/person/xx-approve-members.txt
+++ b/lib/lp/registry/stories/person/xx-approve-members.txt
@@ -11,7 +11,7 @@ proposed members at once.
1111
12Let's have a look at the proposed members that we have.12Let's have a look at the proposed members that we have.
1313
14 >>> print extract_text(find_tag_by_id(browser.contents, 'member-list'))14 >>> print(extract_text(find_tag_by_id(browser.contents, 'member-list')))
15 Andrew Bennetts (Applied on ...) Approve Decline Hold15 Andrew Bennetts (Applied on ...) Approve Decline Hold
16 Sample Person (Applied on ...) Approve Decline Hold16 Sample Person (Applied on ...) Approve Decline Hold
1717
@@ -29,7 +29,7 @@ Person's. A comment is also sent to the applying users and the team admins.
29 >>> len(stub.test_emails)29 >>> len(stub.test_emails)
30 1230 12
31 >>> for from_addr, to_addrs, raw_msg in sorted(stub.test_emails):31 >>> for from_addr, to_addrs, raw_msg in sorted(stub.test_emails):
32 ... print to_addrs32 ... print(to_addrs)
33 ['andrew.bennetts@ubuntulinux.com']33 ['andrew.bennetts@ubuntulinux.com']
34 ['colin.watson@ubuntulinux.com']34 ['colin.watson@ubuntulinux.com']
35 ['colin.watson@ubuntulinux.com']35 ['colin.watson@ubuntulinux.com']
@@ -42,7 +42,7 @@ Person's. A comment is also sent to the applying users and the team admins.
42 ['mark@example.com']42 ['mark@example.com']
43 ['mark@example.com']43 ['mark@example.com']
44 ['test@canonical.com']44 ['test@canonical.com']
45 >>> print raw_msg45 >>> print(raw_msg)
46 Content-Type: text/plain; charset="utf-8"46 Content-Type: text/plain; charset="utf-8"
47 ...47 ...
48 Mark Shuttleworth said:48 Mark Shuttleworth said:
@@ -54,7 +54,7 @@ as an inactive one.
5454
55 >>> browser.url55 >>> browser.url
56 'http://launchpad.test/~ubuntu-team/+members'56 'http://launchpad.test/~ubuntu-team/+members'
57 >>> print extract_text(find_tag_by_id(browser.contents, 'activemembers'))57 >>> print(extract_text(find_tag_by_id(browser.contents, 'activemembers')))
58 Name Member since Expires Status58 Name Member since Expires Status
59 ...59 ...
60 Andrew Bennetts60 Andrew Bennetts
diff --git a/lib/lp/registry/stories/person/xx-deactivate-account.txt b/lib/lp/registry/stories/person/xx-deactivate-account.txt
index 4267cc7..9b41ec4 100644
--- a/lib/lp/registry/stories/person/xx-deactivate-account.txt
+++ b/lib/lp/registry/stories/person/xx-deactivate-account.txt
@@ -56,8 +56,8 @@ And now the Launchpad page for Sample Person person will clearly say they
56do not use Launchpad.56do not use Launchpad.
5757
58 >>> browser.open('http://launchpad.test/~name12-deactivatedaccount')58 >>> browser.open('http://launchpad.test/~name12-deactivatedaccount')
59 >>> print extract_text(59 >>> print(extract_text(
60 ... find_tag_by_id(browser.contents, 'not-lp-user-or-team'))60 ... find_tag_by_id(browser.contents, 'not-lp-user-or-team')))
61 Sample Person does not use Launchpad.61 Sample Person does not use Launchpad.
6262
63The bugs that were assigned to Sample Person will no longer have an63The bugs that were assigned to Sample Person will no longer have an
@@ -65,7 +65,7 @@ assignee.
6565
66 >>> browser.open('http://launchpad.test/debian/+source/'66 >>> browser.open('http://launchpad.test/debian/+source/'
67 ... 'mozilla-firefox/+bug/3')67 ... 'mozilla-firefox/+bug/3')
68 >>> print extract_text(find_main_content(browser.contents))68 >>> print(extract_text(find_main_content(browser.contents)))
69 Bug Title Test69 Bug Title Test
70 ...70 ...
71 Assigned to71 Assigned to
@@ -76,7 +76,7 @@ Although teams have NOACCOUNT as their account_status, they are teams and so
76it makes no sense to say they don't use Launchpad.76it makes no sense to say they don't use Launchpad.
7777
78 >>> browser.open('http://launchpad.test/~ubuntu-team')78 >>> browser.open('http://launchpad.test/~ubuntu-team')
79 >>> print find_tag_by_id(browser.contents, 'not-lp-user-or-team')79 >>> print(find_tag_by_id(browser.contents, 'not-lp-user-or-team'))
80 None80 None
8181
82The action of deactivating an account is something that can only be done by82The action of deactivating an account is something that can only be done by
diff --git a/lib/lp/registry/stories/person/xx-people-index.txt b/lib/lp/registry/stories/person/xx-people-index.txt
index e09d112..ea6f71d 100644
--- a/lib/lp/registry/stories/person/xx-people-index.txt
+++ b/lib/lp/registry/stories/person/xx-people-index.txt
@@ -1,9 +1,9 @@
11
2 Test /people.2 Test /people.
33
4 >>> print http(r"""4 >>> print(http(r"""
5 ... GET /people HTTP/1.15 ... GET /people HTTP/1.1
6 ... """)6 ... """))
7 HTTP/1.1 200 Ok7 HTTP/1.1 200 Ok
8 Content-Length: ...8 Content-Length: ...
9 Content-Type: text/html;charset=utf-89 Content-Type: text/html;charset=utf-8
diff --git a/lib/lp/registry/stories/person/xx-people-search.txt b/lib/lp/registry/stories/person/xx-people-search.txt
index 702092b..c9b4b9a 100644
--- a/lib/lp/registry/stories/person/xx-people-search.txt
+++ b/lib/lp/registry/stories/person/xx-people-search.txt
@@ -5,7 +5,7 @@ Searching for people
5--------------------5--------------------
66
7 >>> browser.open('http://launchpad.test/people')7 >>> browser.open('http://launchpad.test/people')
8 >>> print browser.title8 >>> print(browser.title)
9 People and teams in Launchpad9 People and teams in Launchpad
1010
11Search for all people and teams with the string "foo bar". There11Search for all people and teams with the string "foo bar". There
@@ -14,13 +14,13 @@ should just be the one person named "Foo Bar" found.
14 >>> browser.getControl(name='name').value = 'foo bar'14 >>> browser.getControl(name='name').value = 'foo bar'
15 >>> browser.getControl('Search').click()15 >>> browser.getControl('Search').click()
16 >>> listing = find_tag_by_id(browser.contents, 'people-results')16 >>> listing = find_tag_by_id(browser.contents, 'people-results')
17 >>> print extract_text(listing)17 >>> print(extract_text(listing))
18 Name Launchpad ID Karma18 Name Launchpad ID Karma
19 Foo Bar name16 24119 Foo Bar name16 241
2020
21The listing is sortable.21The listing is sortable.
2222
23 >>> print ' '.join(listing['class'])23 >>> print(' '.join(listing['class']))
24 listing sortable24 listing sortable
2525
26Search for all people and teams like "launchpad" the users sees three26Search for all people and teams like "launchpad" the users sees three
@@ -29,7 +29,7 @@ columns of people and teams..
29 >>> browser.getControl(name='name').value = 'launchpad'29 >>> browser.getControl(name='name').value = 'launchpad'
30 >>> browser.getControl('Search').click()30 >>> browser.getControl('Search').click()
31 >>> listing = find_tag_by_id(browser.contents, 'people-results')31 >>> listing = find_tag_by_id(browser.contents, 'people-results')
32 >>> print extract_text(listing, formatter='html')32 >>> print(extract_text(listing, formatter='html'))
33 Name Launchpad ID Karma33 Name Launchpad ID Karma
34 Julian Edwards launchpad-julian-edwards 034 Julian Edwards launchpad-julian-edwards 0
35 Launchpad Administrators admins &mdash;35 Launchpad Administrators admins &mdash;
@@ -45,7 +45,7 @@ shown. There are only two columns because teams cannot have karma.
45 >>> browser.getControl(name='searchfor').value = ['teamsonly']45 >>> browser.getControl(name='searchfor').value = ['teamsonly']
46 >>> browser.getControl('Search').click()46 >>> browser.getControl('Search').click()
47 >>> listing = find_tag_by_id(browser.contents, 'people-results')47 >>> listing = find_tag_by_id(browser.contents, 'people-results')
48 >>> print extract_text(listing)48 >>> print(extract_text(listing))
49 Name Launchpad ID49 Name Launchpad ID
50 Launchpad Administrators admins50 Launchpad Administrators admins
51 Launchpad Beta Testers launchpad-beta-testers51 Launchpad Beta Testers launchpad-beta-testers
@@ -59,7 +59,7 @@ Restrict the search to people and only individuals are listed.
59 >>> browser.getControl(name='searchfor').value = ['peopleonly']59 >>> browser.getControl(name='searchfor').value = ['peopleonly']
60 >>> browser.getControl('Search').click()60 >>> browser.getControl('Search').click()
61 >>> listing = find_tag_by_id(browser.contents, 'people-results')61 >>> listing = find_tag_by_id(browser.contents, 'people-results')
62 >>> print extract_text(listing)62 >>> print(extract_text(listing))
63 Name Launchpad ID Karma63 Name Launchpad ID Karma
64 Julian Edwards launchpad-julian-edwards 064 Julian Edwards launchpad-julian-edwards 0
65 Launchpad Beta Testers Owner launchpad-beta-owner 065 Launchpad Beta Testers Owner launchpad-beta-owner 0
diff --git a/lib/lp/registry/stories/person/xx-person-claim-merge.txt b/lib/lp/registry/stories/person/xx-person-claim-merge.txt
index 1b723b6..caad3d3 100644
--- a/lib/lp/registry/stories/person/xx-person-claim-merge.txt
+++ b/lib/lp/registry/stories/person/xx-person-claim-merge.txt
@@ -7,7 +7,7 @@ exception that will redirect the user to the login page.
77
8 >>> anon_browser.open('http://launchpad.test/~matsubara')8 >>> anon_browser.open('http://launchpad.test/~matsubara')
9 >>> link = anon_browser.getLink("Are you Diogo Matsubara?")9 >>> link = anon_browser.getLink("Are you Diogo Matsubara?")
10 >>> print link.url10 >>> print(link.url)
11 http://launchpad.test/people/+requestmerge?field.dupe_person=matsubara11 http://launchpad.test/people/+requestmerge?field.dupe_person=matsubara
12 >>> link.click()12 >>> link.click()
13 Traceback (most recent call last):13 Traceback (most recent call last):
diff --git a/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.txt b/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.txt
index ae19df1..f2a6112 100644
--- a/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.txt
+++ b/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.txt
@@ -13,7 +13,7 @@ profile page and uses the 'Update Jabber IDs' link.
1313
14 >>> user_browser.open('http://launchpad.test/~no-priv')14 >>> user_browser.open('http://launchpad.test/~no-priv')
15 >>> user_browser.getLink('Update Jabber IDs').click()15 >>> user_browser.getLink('Update Jabber IDs').click()
16 >>> print user_browser.title16 >>> print(user_browser.title)
17 No Privileges Person's Jabber IDs...17 No Privileges Person's Jabber IDs...
1818
19The user enters the Jabber ID in the text field and clicks on the19The user enters the Jabber ID in the text field and clicks on the
@@ -29,7 +29,7 @@ an error is displayed and the user can enter another one:
2929
30 >>> def show_errors(browser):30 >>> def show_errors(browser):
31 ... for error in find_tags_by_class(browser.contents, 'error'):31 ... for error in find_tags_by_class(browser.contents, 'error'):
32 ... print extract_text(error)32 ... print(extract_text(error))
33 >>> show_errors(user_browser)33 >>> show_errors(user_browser)
34 There is 1 error.34 There is 1 error.
35 New Jabber user ID:35 New Jabber user ID:
@@ -46,7 +46,7 @@ it will be associated with their account.
46 >>> def show_jabberids(browser):46 >>> def show_jabberids(browser):
47 ... tags = find_tag_by_id(browser.contents, 'jabber-ids')47 ... tags = find_tag_by_id(browser.contents, 'jabber-ids')
48 ... for dd in tags.findAll('dd'):48 ... for dd in tags.findAll('dd'):
49 ... print extract_text(dd)49 ... print(extract_text(dd))
5050
51 >>> show_jabberids(user_browser)51 >>> show_jabberids(user_browser)
52 no-priv@jabber.org52 no-priv@jabber.org
diff --git a/lib/lp/registry/stories/person/xx-person-edit.txt b/lib/lp/registry/stories/person/xx-person-edit.txt
index 54b12b6..4769324 100644
--- a/lib/lp/registry/stories/person/xx-person-edit.txt
+++ b/lib/lp/registry/stories/person/xx-person-edit.txt
@@ -23,8 +23,8 @@ Launchpad.
23They can see a link to an FAQ that explains launchpad accounts and passwords.23They can see a link to an FAQ that explains launchpad accounts and passwords.
24Note that this is a link to an FAQ in production databases.24Note that this is a link to an FAQ in production databases.
2525
26 >>> print browser.getLink(26 >>> print(browser.getLink(
27 ... 'Learn about your Launchpad account and password').url27 ... 'Learn about your Launchpad account and password').url)
28 http://launchpad.test/launchpad/+faq/5128 http://launchpad.test/launchpad/+faq/51
2929
30They noticed that their information is out of date and will update it.30They noticed that their information is out of date and will update it.
diff --git a/lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt b/lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt
index 352d3e9..d3f8e52 100644
--- a/lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt
+++ b/lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt
@@ -38,7 +38,7 @@ Attempts to claim a revoked OpenPGP key fail:
38 ... '84D205F03E1E67096CB54E262BE83793AACCD97C')38 ... '84D205F03E1E67096CB54E262BE83793AACCD97C')
39 >>> browser.getControl('Import Key').click()39 >>> browser.getControl('Import Key').click()
40 >>> for tag in find_tags_by_class(browser.contents, 'error message'):40 >>> for tag in find_tags_by_class(browser.contents, 'error message'):
41 ... print tag.renderContents()41 ... print(tag.renderContents())
42 <BLANKLINE>42 <BLANKLINE>
43 The key 84D205F03E1E67096CB54E262BE83793AACCD97C cannot be validated43 The key 84D205F03E1E67096CB54E262BE83793AACCD97C cannot be validated
44 because it has been publicly revoked.44 because it has been publicly revoked.
@@ -54,7 +54,7 @@ Attempts to claim an expired OpenPGP key also fail:
54 ... '0DD64D28E5F41138533495200E3DB4D402F53CC6')54 ... '0DD64D28E5F41138533495200E3DB4D402F53CC6')
55 >>> browser.getControl('Import Key').click()55 >>> browser.getControl('Import Key').click()
56 >>> for tag in find_tags_by_class(browser.contents, 'error message'):56 >>> for tag in find_tags_by_class(browser.contents, 'error message'):
57 ... print tag.renderContents()57 ... print(tag.renderContents())
58 <BLANKLINE>58 <BLANKLINE>
59 The key 0DD64D28E5F41138533495200E3DB4D402F53CC6 cannot be validated59 The key 0DD64D28E5F41138533495200E3DB4D402F53CC6 cannot be validated
60 because it has expired. Change the expiry date (in a terminal, enter60 because it has expired. Change the expiry date (in a terminal, enter
@@ -89,7 +89,7 @@ Try to validate the revoked OpenPGP key:
89 ... 'http://launchpad.test/token/%s/+validategpg' % revoked_key_token)89 ... 'http://launchpad.test/token/%s/+validategpg' % revoked_key_token)
90 >>> browser.getControl('Continue').click()90 >>> browser.getControl('Continue').click()
91 >>> for tag in find_tags_by_class(browser.contents, 'error message'):91 >>> for tag in find_tags_by_class(browser.contents, 'error message'):
92 ... print tag.renderContents()92 ... print(tag.renderContents())
93 There is 1 error.93 There is 1 error.
94 The key 84D205F03E1E67096CB54E262BE83793AACCD97C cannot be validated94 The key 84D205F03E1E67096CB54E262BE83793AACCD97C cannot be validated
95 because it has been publicly revoked.95 because it has been publicly revoked.
@@ -105,7 +105,7 @@ Try to validate the revoked OpenPGP key:
105 ... 'http://launchpad.test/token/%s/+validategpg' % expired_key_token)105 ... 'http://launchpad.test/token/%s/+validategpg' % expired_key_token)
106 >>> browser.getControl('Continue').click()106 >>> browser.getControl('Continue').click()
107 >>> for tag in find_tags_by_class(browser.contents, 'error message'):107 >>> for tag in find_tags_by_class(browser.contents, 'error message'):
108 ... print tag.renderContents()108 ... print(tag.renderContents())
109 There is 1 error.109 There is 1 error.
110 The key 0DD64D28E5F41138533495200E3DB4D402F53CC6 cannot be validated110 The key 0DD64D28E5F41138533495200E3DB4D402F53CC6 cannot be validated
111 because it has expired. Change the expiry date (in a terminal, enter111 because it has expired. Change the expiry date (in a terminal, enter
diff --git a/lib/lp/registry/stories/person/xx-person-home.txt b/lib/lp/registry/stories/person/xx-person-home.txt
index ecc4958..e1de161 100644
--- a/lib/lp/registry/stories/person/xx-person-home.txt
+++ b/lib/lp/registry/stories/person/xx-person-home.txt
@@ -11,7 +11,7 @@ profile for them.
11 'Diogo Matsubara does not use Launchpad'11 'Diogo Matsubara does not use Launchpad'
1212
13 >>> content = find_main_content(browser.contents).find('p')13 >>> content = find_main_content(browser.contents).find('p')
14 >>> print extract_text(content)14 >>> print(extract_text(content))
15 Diogo Matsubara does not use Launchpad. This page was created on15 Diogo Matsubara does not use Launchpad. This page was created on
16 2006-12-13 when importing the Portuguese...16 2006-12-13 when importing the Portuguese...
1717
@@ -23,31 +23,31 @@ Mark has a registered email address, and he has chosen to disclose it to
23the world. Anonymous users cannot see Mark's address23the world. Anonymous users cannot see Mark's address
2424
25 >>> anon_browser.open('http://launchpad.test/~mark')25 >>> anon_browser.open('http://launchpad.test/~mark')
26 >>> print extract_text(26 >>> print(extract_text(
27 ... find_tag_by_id(anon_browser.contents, 'email-addresses'))27 ... find_tag_by_id(anon_browser.contents, 'email-addresses')))
28 Email: Log in for email information.28 Email: Log in for email information.
2929
30A logged in user such as Sample Person, can see Mark's addresses.30A logged in user such as Sample Person, can see Mark's addresses.
3131
32 >>> sample_browser = setupBrowser(auth='Basic test@canonical.com:test')32 >>> sample_browser = setupBrowser(auth='Basic test@canonical.com:test')
33 >>> sample_browser.open('http://launchpad.test/~mark')33 >>> sample_browser.open('http://launchpad.test/~mark')
34 >>> print extract_text(34 >>> print(extract_text(
35 ... find_tag_by_id(sample_browser.contents, 'email-addresses'))35 ... find_tag_by_id(sample_browser.contents, 'email-addresses')))
36 Email: mark@example.com36 Email: mark@example.com
3737
38As for Sample Person, they have chosen not to disclose their email addresses.38As for Sample Person, they have chosen not to disclose their email addresses.
39Unprivileged users like No Privileges Person cannot see their addresses:39Unprivileged users like No Privileges Person cannot see their addresses:
4040
41 >>> user_browser.open('http://launchpad.test/~name12')41 >>> user_browser.open('http://launchpad.test/~name12')
42 >>> print extract_text(42 >>> print(extract_text(
43 ... find_tag_by_id(user_browser.contents, 'email-addresses'))43 ... find_tag_by_id(user_browser.contents, 'email-addresses')))
44 Email: No public address provided.44 Email: No public address provided.
4545
46But Foo Bar can:46But Foo Bar can:
4747
48 >>> admin_browser.open('http://launchpad.test/~name12')48 >>> admin_browser.open('http://launchpad.test/~name12')
49 >>> print extract_text(49 >>> print(extract_text(
50 ... find_tag_by_id(admin_browser.contents, 'email-addresses'))50 ... find_tag_by_id(admin_browser.contents, 'email-addresses')))
51 Email:51 Email:
52 test@canonical.com52 test@canonical.com
53 testing@canonical.com53 testing@canonical.com
@@ -61,25 +61,25 @@ Open ID link
61When a person visits their own page, they'll see their OpenID login URL.61When a person visits their own page, they'll see their OpenID login URL.
6262
63 >>> user_browser.open('http://launchpad.test/~no-priv')63 >>> user_browser.open('http://launchpad.test/~no-priv')
64 >>> print extract_text(64 >>> print(extract_text(
65 ... find_tag_by_id(user_browser.contents, 'openid-info'))65 ... find_tag_by_id(user_browser.contents, 'openid-info')))
66 OpenID login:66 OpenID login:
67 http://launchpad.test/~no-priv...67 http://launchpad.test/~no-priv...
6868
69The URL is followed by a helpful link.69The URL is followed by a helpful link.
7070
71 >>> print user_browser.getLink('OpenID help').url71 >>> print(user_browser.getLink('OpenID help').url)
72 http://launchpad.test/+help-registry/openid.html72 http://launchpad.test/+help-registry/openid.html
7373
74However, when the user visits someone else's page, they see no such URL.74However, when the user visits someone else's page, they see no such URL.
7575
76 >>> user_browser.open('http://launchpad.test/~salgado')76 >>> user_browser.open('http://launchpad.test/~salgado')
77 >>> print find_tag_by_id(user_browser.contents, 'openid-info')77 >>> print(find_tag_by_id(user_browser.contents, 'openid-info'))
78 None78 None
7979
80And there is no helpful link.80And there is no helpful link.
8181
82 >>> print user_browser.getLink('openid help').url82 >>> print(user_browser.getLink('openid help').url)
83 Traceback (most recent call last):83 Traceback (most recent call last):
84 ...84 ...
85 LinkNotFoundError85 LinkNotFoundError
@@ -91,13 +91,13 @@ Jabber IDs
91A person's jabber IDs are only show to authenticated users.91A person's jabber IDs are only show to authenticated users.
9292
93 >>> user_browser.open('http://launchpad.test/~mark')93 >>> user_browser.open('http://launchpad.test/~mark')
94 >>> print extract_text(94 >>> print(extract_text(
95 ... find_tag_by_id(user_browser.contents, 'jabber-ids'))95 ... find_tag_by_id(user_browser.contents, 'jabber-ids')))
96 Jabber: markshuttleworth@jabber.org96 Jabber: markshuttleworth@jabber.org
9797
98 >>> anon_browser.open('http://launchpad.test/~mark')98 >>> anon_browser.open('http://launchpad.test/~mark')
99 >>> print extract_text(99 >>> print(extract_text(
100 ... find_tag_by_id(anon_browser.contents, 'jabber-ids'))100 ... find_tag_by_id(anon_browser.contents, 'jabber-ids')))
101 Jabber: &lt;email address hidden&gt;101 Jabber: &lt;email address hidden&gt;
102102
103103
@@ -109,12 +109,12 @@ just by following the link to that person's OpenPGP keys, only
109authenticated users can see the key fingerprint with a link to the keyserver.109authenticated users can see the key fingerprint with a link to the keyserver.
110110
111 >>> user_browser.open('http://launchpad.test/~name16')111 >>> user_browser.open('http://launchpad.test/~name16')
112 >>> print find_tag_by_id(user_browser.contents, 'pgp-keys')112 >>> print(find_tag_by_id(user_browser.contents, 'pgp-keys'))
113 <dl...113 <dl...
114 <a href="https://keyserver...114 <a href="https://keyserver...
115115
116 >>> anon_browser.open('http://launchpad.test/~name16')116 >>> anon_browser.open('http://launchpad.test/~name16')
117 >>> print find_tag_by_id(anon_browser.contents, 'pgp-keys')117 >>> print(find_tag_by_id(anon_browser.contents, 'pgp-keys'))
118 <dl...118 <dl...
119 <dd> ABCDEF0123456789ABCDDCBA0000111112345678...119 <dd> ABCDEF0123456789ABCDDCBA0000111112345678...
120120
@@ -126,7 +126,7 @@ The contact details portlet shows the languages that the user speaks. No
126Privileges Person can see the languages that mark speaks.126Privileges Person can see the languages that mark speaks.
127127
128 >>> user_browser.open('http://launchpad.test/~carlos')128 >>> user_browser.open('http://launchpad.test/~carlos')
129 >>> print extract_text(find_tag_by_id(user_browser.contents, 'languages'))129 >>> print(extract_text(find_tag_by_id(user_browser.contents, 'languages')))
130 Languages:130 Languages:
131 Catalan, English, Spanish131 Catalan, English, Spanish
132132
@@ -134,7 +134,7 @@ When viewing their own page, No Privileges Person sees their languages and
134can edit them.134can edit them.
135135
136 >>> user_browser.open('http://launchpad.test/~no-priv')136 >>> user_browser.open('http://launchpad.test/~no-priv')
137 >>> print extract_text(find_tag_by_id(user_browser.contents, 'languages'))137 >>> print(extract_text(find_tag_by_id(user_browser.contents, 'languages')))
138 Languages: Set preferred languages138 Languages: Set preferred languages
139 English139 English
140140
@@ -145,36 +145,36 @@ Summary Pagelets
145A person's homepage also lists Karma and Time zone information:145A person's homepage also lists Karma and Time zone information:
146146
147 >>> browser.open('http://launchpad.test/~mark')147 >>> browser.open('http://launchpad.test/~mark')
148 >>> print extract_text(find_tag_by_id(browser.contents, 'karma'))148 >>> print(extract_text(find_tag_by_id(browser.contents, 'karma')))
149 Karma: 130 Karma help149 Karma: 130 Karma help
150150
151 >>> browser.open('http://launchpad.test/~ddaa')151 >>> browser.open('http://launchpad.test/~ddaa')
152 >>> print extract_text(find_tag_by_id(browser.contents, 'timezone'))152 >>> print(extract_text(find_tag_by_id(browser.contents, 'timezone')))
153 Time zone: UTC (UTC+0000)153 Time zone: UTC (UTC+0000)
154154
155Negative Ubuntu Code of Conduct signatory status is only displayed for155Negative Ubuntu Code of Conduct signatory status is only displayed for
156yourself; others won't see it:156yourself; others won't see it:
157157
158 >>> print find_tag_by_id(browser.contents, 'ubuntu-coc')158 >>> print(find_tag_by_id(browser.contents, 'ubuntu-coc'))
159 None159 None
160160
161 >>> browser = setupBrowser(auth='Basic mark@example.com:test')161 >>> browser = setupBrowser(auth='Basic mark@example.com:test')
162 >>> browser.open('http://launchpad.test/~mark')162 >>> browser.open('http://launchpad.test/~mark')
163 >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc'))163 >>> print(extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc')))
164 Signed Ubuntu Code of Conduct: No164 Signed Ubuntu Code of Conduct: No
165165
166You can grab certain bits of information programatically:166You can grab certain bits of information programatically:
167167
168 >>> print extract_text(find_tag_by_id(browser.contents, 'karma-total'))168 >>> print(extract_text(find_tag_by_id(browser.contents, 'karma-total')))
169 130169 130
170170
171 >>> print extract_text(find_tag_by_id(browser.contents, 'member-since'))171 >>> print(extract_text(find_tag_by_id(browser.contents, 'member-since')))
172 2005-06-06172 2005-06-06
173173
174Teams don't have member-since; they have created-date:174Teams don't have member-since; they have created-date:
175175
176 >>> browser.open('http://launchpad.test/~guadamen')176 >>> browser.open('http://launchpad.test/~guadamen')
177 >>> print extract_text(find_tag_by_id(browser.contents, 'created-date'))177 >>> print(extract_text(find_tag_by_id(browser.contents, 'created-date')))
178 2005-06-06178 2005-06-06
179179
180180
@@ -188,11 +188,11 @@ most active and also the areas in which they worked on each project.
188 >>> anon_browser.open('http://launchpad.test/~name16')188 >>> anon_browser.open('http://launchpad.test/~name16')
189 >>> table = find_tag_by_id(anon_browser.contents, 'contributions')189 >>> table = find_tag_by_id(anon_browser.contents, 'contributions')
190 >>> for tr in table.findAll('tr'):190 >>> for tr in table.findAll('tr'):
191 ... print tr.find('th').find('a').renderContents()191 ... print(tr.find('th').find('a').renderContents())
192 ... for td in tr.findAll('td'):192 ... for td in tr.findAll('td'):
193 ... img = td.find('img')193 ... img = td.find('img')
194 ... if img is not None:194 ... if img is not None:
195 ... print "\t", img['title']195 ... print("\t", img['title'])
196 Evolution196 Evolution
197 Bug Management197 Bug Management
198 Translations in Rosetta198 Translations in Rosetta
@@ -214,13 +214,13 @@ If the person hasn't made any contributions, the table is not present in
214its page.214its page.
215215
216 >>> anon_browser.open('http://launchpad.test/~jdub')216 >>> anon_browser.open('http://launchpad.test/~jdub')
217 >>> print find_tag_by_id(anon_browser.contents, 'contributions')217 >>> print(find_tag_by_id(anon_browser.contents, 'contributions'))
218 None218 None
219219
220The same for teams.220The same for teams.
221221
222 >>> anon_browser.open('http://launchpad.test/~ubuntu-team')222 >>> anon_browser.open('http://launchpad.test/~ubuntu-team')
223 >>> print find_tag_by_id(anon_browser.contents, 'contributions')223 >>> print(find_tag_by_id(anon_browser.contents, 'contributions'))
224 None224 None
225225
226226
@@ -232,10 +232,10 @@ were imported into Launchpad. Any user can see an unclaimed profile and
232a link to request a claim the profile.232a link to request a claim the profile.
233233
234 >>> anon_browser.open('https://launchpad.test/~jvprat')234 >>> anon_browser.open('https://launchpad.test/~jvprat')
235 >>> print anon_browser.title235 >>> print(anon_browser.title)
236 Jordi Vilalta does not use Launchpad236 Jordi Vilalta does not use Launchpad
237237
238 >>> print extract_text(find_main_content(anon_browser.contents))238 >>> print(extract_text(find_main_content(anon_browser.contents)))
239 Jordi Vilalta does not use Launchpad. This page was created on ...239 Jordi Vilalta does not use Launchpad. This page was created on ...
240 when importing the Catalan (ca) translation of pmount in Ubuntu Hoary...240 when importing the Catalan (ca) translation of pmount in Ubuntu Hoary...
241241
@@ -257,16 +257,16 @@ users cannot see this, but admins like Foo Bar can.
257 >>> logout()257 >>> logout()
258258
259 >>> anon_browser.open('https://launchpad.test/~jvprat')259 >>> anon_browser.open('https://launchpad.test/~jvprat')
260 >>> print find_tag_by_id(anon_browser.contents, 'email-addresses')260 >>> print(find_tag_by_id(anon_browser.contents, 'email-addresses'))
261 None261 None
262262
263 >>> user_browser.open('https://launchpad.test/~jvprat')263 >>> user_browser.open('https://launchpad.test/~jvprat')
264 >>> print find_tag_by_id(user_browser.contents, 'email-addresses')264 >>> print(find_tag_by_id(user_browser.contents, 'email-addresses'))
265 None265 None
266266
267 >>> admin_browser.open('https://launchpad.test/~jvprat')267 >>> admin_browser.open('https://launchpad.test/~jvprat')
268 >>> print extract_text(268 >>> print(extract_text(
269 ... find_tag_by_id(admin_browser.contents, 'email-addresses'))269 ... find_tag_by_id(admin_browser.contents, 'email-addresses')))
270 jvprat@wanadoo.es270 jvprat@wanadoo.es
271 Change email settings271 Change email settings
272272
diff --git a/lib/lp/registry/stories/person/xx-person-karma.txt b/lib/lp/registry/stories/person/xx-person-karma.txt
index db6931a..fe6181c 100644
--- a/lib/lp/registry/stories/person/xx-person-karma.txt
+++ b/lib/lp/registry/stories/person/xx-person-karma.txt
@@ -7,32 +7,32 @@ the community. A person's current total karma is available on their
7profile page.7profile page.
88
9 >>> anon_browser.open('http://launchpad.test/~name12')9 >>> anon_browser.open('http://launchpad.test/~name12')
10 >>> print anon_browser.title10 >>> print(anon_browser.title)
11 Sample Person in Launchpad11 Sample Person in Launchpad
1212
13 >>> content = find_main_content(anon_browser.contents)13 >>> content = find_main_content(anon_browser.contents)
14 >>> karma = find_tag_by_id(content, 'karma-total')14 >>> karma = find_tag_by_id(content, 'karma-total')
15 >>> print karma.renderContents()15 >>> print(karma.renderContents())
16 13816 138
1717
18The total karma points is also a link to the person's karma summary page.18The total karma points is also a link to the person's karma summary page.
1919
20 >>> anon_browser.getLink('138').click()20 >>> anon_browser.getLink('138').click()
21 >>> print anon_browser.title21 >>> print(anon_browser.title)
22 Karma : Sample Person22 Karma : Sample Person
2323
24Any user can see the categories that a user has earned karma in.24Any user can see the categories that a user has earned karma in.
2525
26 >>> content = find_main_content(anon_browser.contents)26 >>> content = find_main_content(anon_browser.contents)
27 >>> for row in find_tag_by_id(content, 'karmapoints').findAll('tr'):27 >>> for row in find_tag_by_id(content, 'karmapoints').findAll('tr'):
28 ... print extract_text(row)28 ... print(extract_text(row))
29 Bug Management 9429 Bug Management 94
30 Specification Tracking 4430 Specification Tracking 44
3131
32Any user can see that a user has latest actions.32Any user can see that a user has latest actions.
3333
34 >>> for row in find_tag_by_id(content, 'karmaactions').findAll('tr'):34 >>> for row in find_tag_by_id(content, 'karmaactions').findAll('tr'):
35 ... print extract_text(row)35 ... print(extract_text(row))
36 Date Action36 Date Action
37 2001-11-02 Registered Specification37 2001-11-02 Registered Specification
38 2001-11-02 Registered Specification38 2001-11-02 Registered Specification
@@ -43,7 +43,7 @@ The karma page can also show any user that a user has never earned karma.
4343
44 >>> anon_browser.open('http://launchpad.test/~salgado/+karma')44 >>> anon_browser.open('http://launchpad.test/~salgado/+karma')
45 >>> content = find_main_content(anon_browser.contents)45 >>> content = find_main_content(anon_browser.contents)
46 >>> print extract_text(find_tag_by_id(content, 'no-karma'))46 >>> print(extract_text(find_tag_by_id(content, 'no-karma')))
47 No karma has yet been assigned to Guilherme Salgado. Karma is updated47 No karma has yet been assigned to Guilherme Salgado. Karma is updated
48 daily.48 daily.
4949
@@ -52,10 +52,10 @@ a that user's last karma actions
5252
53 >>> anon_browser.open('http://launchpad.test/~karl/+karma')53 >>> anon_browser.open('http://launchpad.test/~karl/+karma')
54 >>> content = find_main_content(anon_browser.contents)54 >>> content = find_main_content(anon_browser.contents)
55 >>> print extract_text(find_tag_by_id(content, 'no-karma'))55 >>> print(extract_text(find_tag_by_id(content, 'no-karma')))
56 Karl Tilbury's karma has expired.56 Karl Tilbury's karma has expired.
5757
58 >>> for row in find_tag_by_id(content, 'karmaactions').findAll('tr'):58 >>> for row in find_tag_by_id(content, 'karmaactions').findAll('tr'):
59 ... print extract_text(row)59 ... print(extract_text(row))
60 Date Action60 Date Action
61 2001-08-09 New Bug Filed61 2001-08-09 New Bug Filed
diff --git a/lib/lp/registry/stories/person/xx-person-projects.txt b/lib/lp/registry/stories/person/xx-person-projects.txt
index ea1e800..89a323c 100644
--- a/lib/lp/registry/stories/person/xx-person-projects.txt
+++ b/lib/lp/registry/stories/person/xx-person-projects.txt
@@ -8,7 +8,7 @@ team.
8 >>> related_projects = find_tag_by_id(8 >>> related_projects = find_tag_by_id(
9 ... anon_browser.contents, 'portlet-related-projects')9 ... anon_browser.contents, 'portlet-related-projects')
10 >>> for tr in related_projects.findAll('tr'):10 >>> for tr in related_projects.findAll('tr'):
11 ... print extract_text(tr)11 ... print(extract_text(tr))
12 Ubuntu12 Ubuntu
13 ubuntutest13 ubuntutest
14 Tomcat14 Tomcat
@@ -16,12 +16,12 @@ team.
16The +related-projects page displays a table with project names.16The +related-projects page displays a table with project names.
1717
18 >>> anon_browser.getLink('Show related projects').click()18 >>> anon_browser.getLink('Show related projects').click()
19 >>> print anon_browser.title19 >>> print(anon_browser.title)
20 Related projects : ...Ubuntu Team... team20 Related projects : ...Ubuntu Team... team
2121
22 >>> related_projects = find_tag_by_id(22 >>> related_projects = find_tag_by_id(
23 ... anon_browser.contents, 'related-projects')23 ... anon_browser.contents, 'related-projects')
24 >>> print extract_text(related_projects)24 >>> print(extract_text(related_projects))
25 Name Owner Driver Bug Supervisor25 Name Owner Driver Bug Supervisor
26 Ubuntu yes no no26 Ubuntu yes no no
27 ubuntutest yes no no27 ubuntutest yes no no
@@ -32,16 +32,16 @@ A person's projects are accessible via a link on the 'Related packages' page.
3232
33 >>> anon_browser.open('http://launchpad.test/~mark')33 >>> anon_browser.open('http://launchpad.test/~mark')
34 >>> anon_browser.getLink('Related packages').click()34 >>> anon_browser.getLink('Related packages').click()
35 >>> print anon_browser.url35 >>> print(anon_browser.url)
36 http://launchpad.test/~mark/+related-packages36 http://launchpad.test/~mark/+related-packages
37 >>> print anon_browser.title37 >>> print(anon_browser.title)
38 Related packages : Mark Shuttleworth38 Related packages : Mark Shuttleworth
3939
40 >>> anon_browser.open('http://launchpad.test/~mark')40 >>> anon_browser.open('http://launchpad.test/~mark')
41 >>> anon_browser.getLink('Related projects').click()41 >>> anon_browser.getLink('Related projects').click()
42 >>> related_projects = find_tag_by_id(42 >>> related_projects = find_tag_by_id(
43 ... anon_browser.contents, 'related-projects')43 ... anon_browser.contents, 'related-projects')
44 >>> print extract_text(related_projects)44 >>> print(extract_text(related_projects))
45 Name Owner Driver Bug Supervisor45 Name Owner Driver Bug Supervisor
46 Debian yes no no46 Debian yes no no
47 Gentoo yes no no47 Gentoo yes no no
diff --git a/lib/lp/registry/stories/person/xx-person-rdf.txt b/lib/lp/registry/stories/person/xx-person-rdf.txt
index 849853f..fa390ab 100644
--- a/lib/lp/registry/stories/person/xx-person-rdf.txt
+++ b/lib/lp/registry/stories/person/xx-person-rdf.txt
@@ -10,7 +10,7 @@ We export FOAF RDF metadata from the /~Person.name/+index document.
10 >>> anon_browser.open("http://launchpad.test/~name16")10 >>> anon_browser.open("http://launchpad.test/~name16")
11 >>> strainer = SoupStrainer(['link'], {'type': ['application/rdf+xml']})11 >>> strainer = SoupStrainer(['link'], {'type': ['application/rdf+xml']})
12 >>> soup = BeautifulSoup(anon_browser.contents, parse_only=strainer)12 >>> soup = BeautifulSoup(anon_browser.contents, parse_only=strainer)
13 >>> print soup.renderContents()13 >>> print(soup.renderContents())
14 <link href="+rdf" rel="meta" title="FOAF" type="application/rdf+xml"/>14 <link href="+rdf" rel="meta" title="FOAF" type="application/rdf+xml"/>
1515
1616
@@ -21,7 +21,7 @@ And this is what the FOAF document for an individual actually looks
21like. It includes GPG information, if the user has any.21like. It includes GPG information, if the user has any.
2222
23 >>> anon_browser.open("http://launchpad.test/~name16/+rdf")23 >>> anon_browser.open("http://launchpad.test/~name16/+rdf")
24 >>> print anon_browser.contents24 >>> print(anon_browser.contents)
25 <?xml version="1.0"...?>25 <?xml version="1.0"...?>
26 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"26 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
27 xmlns:foaf="http://xmlns.com/foaf/0.1/"27 xmlns:foaf="http://xmlns.com/foaf/0.1/"
@@ -45,7 +45,7 @@ like. It includes GPG information, if the user has any.
45It also includes SSH keys:45It also includes SSH keys:
4646
47 >>> anon_browser.open("http://launchpad.test/~name12/+rdf")47 >>> anon_browser.open("http://launchpad.test/~name12/+rdf")
48 >>> print anon_browser.contents48 >>> print(anon_browser.contents)
49 <?xml version="1.0"...?>49 <?xml version="1.0"...?>
50 ...50 ...
51 <foaf:name>Sample Person</foaf:name>51 <foaf:name>Sample Person</foaf:name>
@@ -57,7 +57,7 @@ And it's valid XML and RDF:
5757
58 >>> from xml.dom.minidom import parseString58 >>> from xml.dom.minidom import parseString
59 >>> document = parseString(str(anon_browser.contents))59 >>> document = parseString(str(anon_browser.contents))
60 >>> print document.documentElement.nodeName60 >>> print(document.documentElement.nodeName)
61 rdf:RDF61 rdf:RDF
6262
6363
@@ -78,7 +78,7 @@ Now, generate the RDF itself:
7878
79 >>> from lp.services.helpers import backslashreplace79 >>> from lp.services.helpers import backslashreplace
80 >>> anon_browser.open("http://launchpad.test/~testing-spanish-team/+rdf")80 >>> anon_browser.open("http://launchpad.test/~testing-spanish-team/+rdf")
81 >>> print backslashreplace(anon_browser.contents)81 >>> print(backslashreplace(anon_browser.contents))
82 <?xml version="1.0"...?>82 <?xml version="1.0"...?>
83 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"83 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
84 xmlns:foaf="http://xmlns.com/foaf/0.1/"84 xmlns:foaf="http://xmlns.com/foaf/0.1/"
@@ -118,7 +118,7 @@ present:
118118
119And nothing about them is rendered at all:119And nothing about them is rendered at all:
120120
121 >>> print anon_browser.contents121 >>> print(anon_browser.contents)
122 <?xml version="1.0"...?>122 <?xml version="1.0"...?>
123 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"123 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
124 xmlns:foaf="http://xmlns.com/foaf/0.1/"124 xmlns:foaf="http://xmlns.com/foaf/0.1/"
diff --git a/lib/lp/registry/stories/person/xx-person-subscriptions.txt b/lib/lp/registry/stories/person/xx-person-subscriptions.txt
index 669d940..8546cb1 100644
--- a/lib/lp/registry/stories/person/xx-person-subscriptions.txt
+++ b/lib/lp/registry/stories/person/xx-person-subscriptions.txt
@@ -8,7 +8,7 @@ Any user can view the direct subscriptions that a person or team has to
8blueprints, branches, bugs, merge proposals and questions.8blueprints, branches, bugs, merge proposals and questions.
99
10 >>> anon_browser.open('http://launchpad.test/~ubuntu-team/+subscriptions')10 >>> anon_browser.open('http://launchpad.test/~ubuntu-team/+subscriptions')
11 >>> print anon_browser.title11 >>> print(anon_browser.title)
12 Subscriptions : Bugs : ā€œUbuntu Teamā€ team12 Subscriptions : Bugs : ā€œUbuntu Teamā€ team
1313
14The user can see that the Ubuntu Team does not have any direct bug14The user can see that the Ubuntu Team does not have any direct bug
@@ -39,8 +39,8 @@ Any user can see Webster's bug subscriptions. The bug subscriptions table
39includes the bug number, title and location.39includes the bug number, title and location.
4040
41 >>> anon_browser.open('http://launchpad.test/~webster/+subscriptions')41 >>> anon_browser.open('http://launchpad.test/~webster/+subscriptions')
42 >>> print extract_text(find_tag_by_id(42 >>> print(extract_text(find_tag_by_id(
43 ... anon_browser.contents, 'bug_subscriptions'))43 ... anon_browser.contents, 'bug_subscriptions')))
44 Summary44 Summary
45 In45 In
46 ...46 ...
@@ -77,7 +77,7 @@ subscribed to the bug. They click cancel which takes them back to their
7777
78 >>> cancel_link = subscriber_browser.getLink('Cancel')78 >>> cancel_link = subscriber_browser.getLink('Cancel')
79 >>> cancel_link.click()79 >>> cancel_link.click()
80 >>> print subscriber_browser.title80 >>> print(subscriber_browser.title)
81 Subscriptions : Bugs : Webster81 Subscriptions : Bugs : Webster
8282
83They choose to unsubscribe from the bug about Affluenza.83They choose to unsubscribe from the bug about Affluenza.
@@ -87,7 +87,7 @@ They choose to unsubscribe from the bug about Affluenza.
87 >>> subscriber_browser.getControl(87 >>> subscriber_browser.getControl(
88 ... "unsubscribe me from this bug").selected = True88 ... "unsubscribe me from this bug").selected = True
89 >>> subscriber_browser.getControl("Continue").click()89 >>> subscriber_browser.getControl("Continue").click()
90 >>> print subscriber_browser.title90 >>> print(subscriber_browser.title)
91 Subscriptions : Bugs : Webster91 Subscriptions : Bugs : Webster
9292
93Webster can see that the bug about Affluenza is no longer listed in their93Webster can see that the bug about Affluenza is no longer listed in their
@@ -95,8 +95,8 @@ direct bug subscriptions.
9595
96 >>> subscriber_browser.open(96 >>> subscriber_browser.open(
97 ... 'http://bugs.launchpad.test/~webster/+subscriptions')97 ... 'http://bugs.launchpad.test/~webster/+subscriptions')
98 >>> print extract_text(find_tag_by_id(98 >>> print(extract_text(find_tag_by_id(
99 ... subscriber_browser.contents, 'bug_subscriptions'))99 ... subscriber_browser.contents, 'bug_subscriptions')))
100 Summary100 Summary
101 In101 In
102 ...102 ...
@@ -118,11 +118,11 @@ Webster chooses to review the subscriptions for their team America.
118118
119 >>> subscriber_browser.open(119 >>> subscriber_browser.open(
120 ... 'http://bugs.launchpad.test/~america/+subscriptions')120 ... 'http://bugs.launchpad.test/~america/+subscriptions')
121 >>> print subscriber_browser.title121 >>> print(subscriber_browser.title)
122 Subscriptions : Bugs ...122 Subscriptions : Bugs ...
123123
124 >>> print extract_text(find_tag_by_id(124 >>> print(extract_text(find_tag_by_id(
125 ... subscriber_browser.contents, 'bug_subscriptions'))125 ... subscriber_browser.contents, 'bug_subscriptions')))
126 Summary126 Summary
127 In127 In
128 ...128 ...
@@ -133,8 +133,8 @@ Webster now chooses to unsubscribe team America from the bug about Scofflaw.
133133
134 >>> subscriber_browser.getLink(id='unsubscribe-subscriber-%s' %134 >>> subscriber_browser.getLink(id='unsubscribe-subscriber-%s' %
135 ... team.id).click()135 ... team.id).click()
136 >>> print extract_text(find_tags_by_class(136 >>> print(extract_text(find_tags_by_class(
137 ... subscriber_browser.contents, 'value')[0])137 ... subscriber_browser.contents, 'value')[0]))
138 subscribe me to this bug, or138 subscribe me to this bug, or
139 unsubscribe America from this bug.139 unsubscribe America from this bug.
140140
@@ -171,9 +171,9 @@ followed by a link to edit the subscription.
171 ... admin_browser.contents, 'structural-subscriptions')171 ... admin_browser.contents, 'structural-subscriptions')
172 >>> for subscription in subscriptions.findAll("li"):172 >>> for subscription in subscriptions.findAll("li"):
173 ... structure_link, modify_link = subscription.findAll("a")[:2]173 ... structure_link, modify_link = subscription.findAll("a")[:2]
174 ... print "%s <%s>" % (174 ... print("%s <%s>" % (
175 ... extract_text(structure_link), structure_link.get("href"))175 ... extract_text(structure_link), structure_link.get("href")))
176 ... print "--> %s" % modify_link.get("href")176 ... print("--> %s" % modify_link.get("href"))
177 mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox>177 mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox>
178 --> /ubuntu/+source/mozilla-firefox/+subscribe178 --> /ubuntu/+source/mozilla-firefox/+subscribe
179 pmount in Ubuntu </ubuntu/+source/pmount>179 pmount in Ubuntu </ubuntu/+source/pmount>
@@ -188,8 +188,8 @@ permission to modify those subscriptions.
188 ... subscriber_browser.contents, 'structural-subscriptions')188 ... subscriber_browser.contents, 'structural-subscriptions')
189 >>> for subscription in subscriptions.findAll("li"):189 >>> for subscription in subscriptions.findAll("li"):
190 ... structure_link = subscription.find("a")190 ... structure_link = subscription.find("a")
191 ... print "%s <%s>" % (191 ... print("%s <%s>" % (
192 ... extract_text(structure_link), structure_link.get("href"))192 ... extract_text(structure_link), structure_link.get("href")))
193 mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox>193 mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox>
194 pmount in Ubuntu </ubuntu/+source/pmount>194 pmount in Ubuntu </ubuntu/+source/pmount>
195195
@@ -204,8 +204,8 @@ structural subscriptions.
204204
205 >>> subscriber_browser.open(205 >>> subscriber_browser.open(
206 ... "http://launchpad.test/people/+me/+structural-subscriptions")206 ... "http://launchpad.test/people/+me/+structural-subscriptions")
207 >>> print extract_text(find_tag_by_id(207 >>> print(extract_text(find_tag_by_id(
208 ... subscriber_browser.contents, "structural-subscriptions"))208 ... subscriber_browser.contents, "structural-subscriptions")))
209 Webster does not have any structural subscriptions.209 Webster does not have any structural subscriptions.
210210
211211
@@ -222,14 +222,14 @@ subscription filter.
222 ... browser.contents, 'structural-subscriptions')222 ... browser.contents, 'structural-subscriptions')
223 ... for subscription in subscriptions.findAll("li"):223 ... for subscription in subscriptions.findAll("li"):
224 ... structure_link = subscription.find("a")224 ... structure_link = subscription.find("a")
225 ... print extract_text(structure_link)225 ... print(extract_text(structure_link))
226 ... create_text = subscription.find(text=re.compile("Create"))226 ... create_text = subscription.find(text=re.compile("Create"))
227 ... if create_text is None:227 ... if create_text is None:
228 ... print "* No create link."228 ... print("* No create link.")
229 ... else:229 ... else:
230 ... print "* %s --> %s" % (230 ... print("* %s --> %s" % (
231 ... create_text.strip(),231 ... create_text.strip(),
232 ... create_text.parent.get("href"))232 ... create_text.parent.get("href")))
233233
234 >>> admin_browser.open(234 >>> admin_browser.open(
235 ... "http://launchpad.test/people/+me/+structural-subscriptions")235 ... "http://launchpad.test/people/+me/+structural-subscriptions")
@@ -273,9 +273,9 @@ filters are shown with a message stating that there is no filtering.
273 ... subscriptions = find_tag_by_id(273 ... subscriptions = find_tag_by_id(
274 ... nigel_browser.contents, 'structural-subscriptions')274 ... nigel_browser.contents, 'structural-subscriptions')
275 ... for subscription in subscriptions.findAll("li"):275 ... for subscription in subscriptions.findAll("li"):
276 ... print extract_text(subscription.p)276 ... print(extract_text(subscription.p))
277 ... if subscription.dl is not None:277 ... if subscription.dl is not None:
278 ... print extract_text(subscription.dl)278 ... print(extract_text(subscription.dl))
279279
280 >>> show_nigels_subscriptions()280 >>> show_nigels_subscriptions()
281 Bug mail for Nigel about Scofflaw is filtered;281 Bug mail for Nigel about Scofflaw is filtered;
diff --git a/lib/lp/registry/stories/person/xx-person-working-on.txt b/lib/lp/registry/stories/person/xx-person-working-on.txt
index 651e90b..fe7041f 100644
--- a/lib/lp/registry/stories/person/xx-person-working-on.txt
+++ b/lib/lp/registry/stories/person/xx-person-working-on.txt
@@ -31,8 +31,8 @@ displayed there.
31 >>> logout()31 >>> logout()
3232
33 >>> anon_browser.open(new_person_url)33 >>> anon_browser.open(new_person_url)
34 >>> print extract_text(34 >>> print(extract_text(
35 ... find_tag_by_id(anon_browser.contents, 'working-on'))35 ... find_tag_by_id(anon_browser.contents, 'working-on')))
36 All bugs in progress36 All bugs in progress
37 Assigned bugs37 Assigned bugs
38 ...38 ...
diff --git a/lib/lp/registry/stories/person/xx-user-to-user.txt b/lib/lp/registry/stories/person/xx-user-to-user.txt
index db92486..c035e1d 100644
--- a/lib/lp/registry/stories/person/xx-user-to-user.txt
+++ b/lib/lp/registry/stories/person/xx-user-to-user.txt
@@ -11,13 +11,13 @@ wants to contact Salgado.
1111
12 >>> user_browser.open('http://launchpad.test/~salgado')12 >>> user_browser.open('http://launchpad.test/~salgado')
13 >>> user_browser.getLink('Contact this user').click()13 >>> user_browser.getLink('Contact this user').click()
14 >>> print user_browser.title14 >>> print(user_browser.title)
15 Contact this user : Guilherme Salgado15 Contact this user : Guilherme Salgado
1616
17 >>> user_browser.getControl('Subject').value = 'Hi Salgado'17 >>> user_browser.getControl('Subject').value = 'Hi Salgado'
18 >>> user_browser.getControl('Message').value = 'Just saying hello'18 >>> user_browser.getControl('Message').value = 'Just saying hello'
19 >>> user_browser.getControl('Send').click()19 >>> user_browser.getControl('Send').click()
20 >>> print user_browser.title20 >>> print(user_browser.title)
21 Guilherme Salgado in Launchpad21 Guilherme Salgado in Launchpad
2222
23Salgado receives the email message from No Priv.23Salgado receives the email message from No Priv.
@@ -25,13 +25,13 @@ Salgado receives the email message from No Priv.
25 >>> len(stub.test_emails)25 >>> len(stub.test_emails)
26 126 1
27 >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop()27 >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop()
28 >>> print from_addr28 >>> print(from_addr)
29 bounces@canonical.com29 bounces@canonical.com
30 >>> len(to_addrs)30 >>> len(to_addrs)
31 131 1
32 >>> print to_addrs[0]32 >>> print(to_addrs[0])
33 Guilherme Salgado <guilherme.salgado@canonical.com>33 Guilherme Salgado <guilherme.salgado@canonical.com>
34 >>> print raw_msg34 >>> print(raw_msg)
35 Content-Type: text/plain; charset="us-ascii"35 Content-Type: text/plain; charset="us-ascii"
36 MIME-Version: 1.036 MIME-Version: 1.0
37 Content-Transfer-Encoding: 7bit37 Content-Transfer-Encoding: 7bit
@@ -47,7 +47,7 @@ mind.
47 >>> user_browser.getControl('Subject').value = 'Hi Salgado'47 >>> user_browser.getControl('Subject').value = 'Hi Salgado'
48 >>> user_browser.getControl('Message').value = 'Hello again'48 >>> user_browser.getControl('Message').value = 'Hello again'
49 >>> user_browser.getLink('Cancel').click()49 >>> user_browser.getLink('Cancel').click()
50 >>> print user_browser.title50 >>> print(user_browser.title)
51 Guilherme Salgado in Launchpad51 Guilherme Salgado in Launchpad
5252
5353
@@ -63,7 +63,7 @@ Sample Person has multiple registered and validated email addresses.
6363
64By default, Sample can use their preferred email address.64By default, Sample can use their preferred email address.
6565
66 >>> print browser.getControl('From').value66 >>> print(browser.getControl('From').value)
67 ['test@canonical.com']67 ['test@canonical.com']
6868
69But they don't have to use their preferred address; they can use one of69But they don't have to use their preferred address; they can use one of
@@ -74,7 +74,7 @@ their alternative addresses.
74 >>> browser.getControl('Send').click()74 >>> browser.getControl('Send').click()
7575
76 >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop()76 >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop()
77 >>> print raw_msg77 >>> print(raw_msg)
78 Content-Type: text/plain; charset="us-ascii"78 Content-Type: text/plain; charset="us-ascii"
79 MIME-Version: 1.079 MIME-Version: 1.0
80 Content-Transfer-Encoding: 7bit80 Content-Transfer-Encoding: 7bit
diff --git a/lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt b/lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt
index d2f0fb2..259de37 100644
--- a/lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt
+++ b/lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt
@@ -65,12 +65,14 @@ But an administrator can still see them if they traverse directly, and
65they'll see an informative message. They can then reactivate them..65they'll see an informative message. They can then reactivate them..
6666
67 >>> admin_browser.open('http://launchpad.test/firefox')67 >>> admin_browser.open('http://launchpad.test/firefox')
68 >>> print find_tag_by_id(admin_browser.contents, 'project-inactive').renderContents()68 >>> print(find_tag_by_id(
69 ... admin_browser.contents, 'project-inactive').renderContents())
69 This project is currently inactive...70 This project is currently inactive...
70 >>> toggleProject('firefox')71 >>> toggleProject('firefox')
7172
72 >>> admin_browser.open('http://launchpad.test/mozilla')73 >>> admin_browser.open('http://launchpad.test/mozilla')
73 >>> print find_tag_by_id(admin_browser.contents, 'project-inactive').renderContents()74 >>> print(find_tag_by_id(
75 ... admin_browser.contents, 'project-inactive').renderContents())
74 This project is currently inactive...76 This project is currently inactive...
75 >>> toggleProject('mozilla')77 >>> toggleProject('mozilla')
7678
@@ -80,12 +82,12 @@ And they are back to normal:
80 >>> anon_browser.getLink(url='/firefox').click()82 >>> anon_browser.getLink(url='/firefox').click()
81 >>> anon_browser.title83 >>> anon_browser.title
82 'Mozilla Firefox in Launchpad'84 'Mozilla Firefox in Launchpad'
83 >>> print find_tag_by_id(anon_browser.contents, 'project-inactive')85 >>> print(find_tag_by_id(anon_browser.contents, 'project-inactive'))
84 None86 None
8587
86 >>> anon_browser.open('http://launchpad.test/projects/+index?text=mozilla')88 >>> anon_browser.open('http://launchpad.test/projects/+index?text=mozilla')
87 >>> anon_browser.getLink(url='/mozilla').click()89 >>> anon_browser.getLink(url='/mozilla').click()
88 >>> anon_browser.title90 >>> anon_browser.title
89 'The Mozilla Project in Launchpad'91 'The Mozilla Project in Launchpad'
90 >>> print find_tag_by_id(anon_browser.contents, 'project-inactive')92 >>> print(find_tag_by_id(anon_browser.contents, 'project-inactive'))
91 None93 None
diff --git a/lib/lp/registry/stories/pillar/xx-pillar-sprints.txt b/lib/lp/registry/stories/pillar/xx-pillar-sprints.txt
index c5784e9..940c933 100644
--- a/lib/lp/registry/stories/pillar/xx-pillar-sprints.txt
+++ b/lib/lp/registry/stories/pillar/xx-pillar-sprints.txt
@@ -8,7 +8,7 @@ all events relevant to that pillar.
8 ... maincontent = find_tag_by_id(contents, 'maincontent')8 ... maincontent = find_tag_by_id(contents, 'maincontent')
9 ... for link in maincontent.findAll('a'):9 ... for link in maincontent.findAll('a'):
10 ... if re.search('/sprints/[a-z0-9]', link['href']) is not None:10 ... if re.search('/sprints/[a-z0-9]', link['href']) is not None:
11 ... print link.renderContents()11 ... print(link.renderContents())
1212
13 >>> anon_browser.open('http://launchpad.test/firefox/+sprints')13 >>> anon_browser.open('http://launchpad.test/firefox/+sprints')
14 >>> print_sprints(anon_browser.contents)14 >>> print_sprints(anon_browser.contents)
diff --git a/lib/lp/registry/stories/product/xx-launchpad-project-search.txt b/lib/lp/registry/stories/product/xx-launchpad-project-search.txt
index 9e1b3b0..d1595e8 100644
--- a/lib/lp/registry/stories/product/xx-launchpad-project-search.txt
+++ b/lib/lp/registry/stories/product/xx-launchpad-project-search.txt
@@ -12,8 +12,8 @@ distributions.
1212
13The user is informed when no matches are found.13The user is informed when no matches are found.
1414
15 >>> print extract_text(15 >>> print(extract_text(
16 ... find_tag_by_id(anon_browser.contents, 'no-matches'))16 ... find_tag_by_id(anon_browser.contents, 'no-matches')))
17 No projects matching ...whizzbar... were found...17 No projects matching ...whizzbar... were found...
1818
19Launchpad shows up to config.launchpad.default_batch_size results; if there19Launchpad shows up to config.launchpad.default_batch_size results; if there
@@ -32,16 +32,16 @@ the user to refine their search.
32 'http://launchpad.test/projects/+index?text=ubuntu'32 'http://launchpad.test/projects/+index?text=ubuntu'
3333
34 >>> content = find_main_content(anon_browser.contents)34 >>> content = find_main_content(anon_browser.contents)
35 >>> print extract_text(find_tag_by_id(content, 'search-summary'))35 >>> print(extract_text(find_tag_by_id(content, 'search-summary')))
36 6 projects found matching ...ubuntu..., showing the most relevant 536 6 projects found matching ...ubuntu..., showing the most relevant 5
3737
38 >>> print extract_text(find_tag_by_id(content, 'too-many-matches'))38 >>> print(extract_text(find_tag_by_id(content, 'too-many-matches')))
39 More than 5 projects were found.39 More than 5 projects were found.
40 You can do another search with more relevant search terms.40 You can do another search with more relevant search terms.
4141
42A lower search form is shown when there are matches.42A lower search form is shown when there are matches.
4343
44 >>> print find_tag_by_id(content, 'project-search-lower').name44 >>> print(find_tag_by_id(content, 'project-search-lower').name)
45 form45 form
4646
47The search results contain projects, project-groups, and distributions.47The search results contain projects, project-groups, and distributions.
@@ -50,7 +50,7 @@ The search results contain projects, project-groups, and distributions.
50 ... search_results = find_tag_by_id(50 ... search_results = find_tag_by_id(
51 ... abrowser.contents, 'search-results')51 ... abrowser.contents, 'search-results')
52 ... for tr in search_results.tbody('tr'):52 ... for tr in search_results.tbody('tr'):
53 ... print ' '.join(tr.td.a['class']), extract_text(tr.td.a)53 ... print(' '.join(tr.td.a['class']), extract_text(tr.td.a))
54 >>> print_search_results(anon_browser)54 >>> print_search_results(anon_browser)
55 sprite distribution Ubuntu55 sprite distribution Ubuntu
56 sprite distribution ubuntutest56 sprite distribution ubuntutest
@@ -74,7 +74,7 @@ some terms and do another search.
74 ''74 ''
75 >>> project_search.getControl('Search').click()75 >>> project_search.getControl('Search').click()
76 >>> empty_search = find_tag_by_id(anon_browser.contents, 'empty-search-string')76 >>> empty_search = find_tag_by_id(anon_browser.contents, 'empty-search-string')
77 >>> print empty_search.renderContents()77 >>> print(empty_search.renderContents())
78 <BLANKLINE>78 <BLANKLINE>
79 ...Enter one or more words related to the project you want to find.79 ...Enter one or more words related to the project you want to find.
80 <BLANKLINE>80 <BLANKLINE>
@@ -93,10 +93,10 @@ A similar page is available for only searching project groups.
93 >>> tags = find_tags_by_class(93 >>> tags = find_tags_by_class(
94 ... anon_browser.contents, "informational message")94 ... anon_browser.contents, "informational message")
95 >>> for tag in tags:95 >>> for tag in tags:
96 ... print tag.renderContents()96 ... print(tag.renderContents())
9797
98The search results contains only project-groups.98The search results contains only project-groups.
9999
100 >>> print extract_text(100 >>> print(extract_text(
101 ... find_main_content(anon_browser.contents).findAll('p')[1])101 ... find_main_content(anon_browser.contents).findAll('p')[1]))
102 1 project group found matching ...gnome...102 1 project group found matching ...gnome...
diff --git a/lib/lp/registry/stories/product/xx-product-add.txt b/lib/lp/registry/stories/product/xx-product-add.txt
index b418979..2a861ca 100644
--- a/lib/lp/registry/stories/product/xx-product-add.txt
+++ b/lib/lp/registry/stories/product/xx-product-add.txt
@@ -6,30 +6,30 @@ either from the Launchpad home page or the projects home page.
66
7 >>> user_browser.open('http://launchpad.test')7 >>> user_browser.open('http://launchpad.test')
8 >>> user_browser.getLink('Register a project').click()8 >>> user_browser.getLink('Register a project').click()
9 >>> print user_browser.title9 >>> print(user_browser.title)
10 Register a project in Launchpad...10 Register a project in Launchpad...
1111
12 >>> user_browser.open('http://launchpad.test/projects')12 >>> user_browser.open('http://launchpad.test/projects')
13 >>> user_browser.getLink('Register a project').click()13 >>> user_browser.getLink('Register a project').click()
14 >>> print user_browser.title14 >>> print(user_browser.title)
15 Register a project in Launchpad...15 Register a project in Launchpad...
1616
17The user can see links about things that are often assumed to be related to17The user can see links about things that are often assumed to be related to
18project registration.18project registration.
1919
20 >>> print user_browser.getLink('Register a team').url20 >>> print(user_browser.getLink('Register a team').url)
21 https://help.launchpad.net/Teams21 https://help.launchpad.net/Teams
2222
23 >>> print user_browser.getLink('Activate a PPA').url23 >>> print(user_browser.getLink('Activate a PPA').url)
24 https://help.launchpad.net/Packaging/PPA24 https://help.launchpad.net/Packaging/PPA
2525
26 >>> print user_browser.getLink('Access your personal branches').url26 >>> print(user_browser.getLink('Access your personal branches').url)
27 https://help.launchpad.net/Code/PersonalBranches27 https://help.launchpad.net/Code/PersonalBranches
2828
29 >>> print user_browser.getLink('Translate a project').url29 >>> print(user_browser.getLink('Translate a project').url)
30 https://help.launchpad.net/Translations/YourProject30 https://help.launchpad.net/Translations/YourProject
3131
32 >>> print user_browser.getLink('Request a project group').url32 >>> print(user_browser.getLink('Request a project group').url)
33 https://help.launchpad.net/ProjectGroups33 https://help.launchpad.net/ProjectGroups
3434
3535
@@ -73,7 +73,7 @@ information correctly this time.
73The project is not yet created; instead, the project basics are successfully73The project is not yet created; instead, the project basics are successfully
74validated and the second step of the process is entered.74validated and the second step of the process is entered.
7575
76 >>> print user_browser.title76 >>> print(user_browser.title)
77 Register a project in Launchpad...77 Register a project in Launchpad...
7878
7979
@@ -85,7 +85,7 @@ modify the project's URL.
8585
86 >>> user_browser.getControl(name='field.name')86 >>> user_browser.getControl(name='field.name')
87 <Control name='field.name' type='hidden'>87 <Control name='field.name' type='hidden'>
88 >>> print user_browser.getControl(name='field.name').value88 >>> print(user_browser.getControl(name='field.name').value)
89 aardvark89 aardvark
9090
91Sample Person is given the opportunity though to change the summary.91Sample Person is given the opportunity though to change the summary.
@@ -97,30 +97,30 @@ They can also add a longer description.
97 ... 'The desktop aardvark is an ornery thing.')97 ... 'The desktop aardvark is an ornery thing.')
98 >>> user_browser.getControl('Python Licence').click()98 >>> user_browser.getControl('Python Licence').click()
99 >>> user_browser.getControl('Complete Registration').click()99 >>> user_browser.getControl('Complete Registration').click()
100 >>> print user_browser.title100 >>> print(user_browser.title)
101 Aardvark Center in Launchpad101 Aardvark Center in Launchpad
102102
103Let's ensure the summary and description are presented.103Let's ensure the summary and description are presented.
104104
105 >>> summary = find_tags_by_class(user_browser.contents,105 >>> summary = find_tags_by_class(user_browser.contents,
106 ... 'summary', only_first=True)106 ... 'summary', only_first=True)
107 >>> print extract_text(summary)107 >>> print(extract_text(summary))
108 Control pesky aardvarkian fnords108 Control pesky aardvarkian fnords
109 >>> desc = find_tags_by_class(user_browser.contents,109 >>> desc = find_tags_by_class(user_browser.contents,
110 ... 'description', only_first=True)110 ... 'description', only_first=True)
111 >>> print extract_text(desc)111 >>> print(extract_text(desc))
112 The desktop aardvark is an ornery thing.112 The desktop aardvark is an ornery thing.
113113
114Let's ensure the registrant and maintainer are listed correctly.114Let's ensure the registrant and maintainer are listed correctly.
115115
116 >>> registrant = find_tag_by_id(user_browser.contents,116 >>> registrant = find_tag_by_id(user_browser.contents,
117 ... 'registration')117 ... 'registration')
118 >>> print extract_text(registrant)118 >>> print(extract_text(registrant))
119 Registered...by...No Privileges Person...119 Registered...by...No Privileges Person...
120120
121 >>> maintainer = find_tag_by_id(user_browser.contents,121 >>> maintainer = find_tag_by_id(user_browser.contents,
122 ... 'owner')122 ... 'owner')
123 >>> print extract_text(maintainer)123 >>> print(extract_text(maintainer))
124 Maintainer: No Privileges Person...124 Maintainer: No Privileges Person...
125125
126126
@@ -150,12 +150,12 @@ Registry Admins.
150150
151 >>> registrant = find_tag_by_id(user_browser.contents,151 >>> registrant = find_tag_by_id(user_browser.contents,
152 ... 'registration')152 ... 'registration')
153 >>> print extract_text(registrant)153 >>> print(extract_text(registrant))
154 Registered...by...No Privileges Person...154 Registered...by...No Privileges Person...
155155
156 >>> maintainer = find_tag_by_id(user_browser.contents,156 >>> maintainer = find_tag_by_id(user_browser.contents,
157 ... 'owner')157 ... 'owner')
158 >>> print extract_text(maintainer)158 >>> print(extract_text(maintainer))
159 Maintainer: Registry Administrators...159 Maintainer: Registry Administrators...
160160
161161
@@ -167,7 +167,7 @@ Firefox.
167167
168 >>> user_browser.open('http://launchpad.test')168 >>> user_browser.open('http://launchpad.test')
169 >>> user_browser.getLink('Register a project').click()169 >>> user_browser.getLink('Register a project').click()
170 >>> print user_browser.title170 >>> print(user_browser.title)
171 Register a project in Launchpad...171 Register a project in Launchpad...
172172
173 >>> user_browser.getControl('Name').value = 'Snowdog'173 >>> user_browser.getControl('Name').value = 'Snowdog'
@@ -183,7 +183,7 @@ Instead of registering their new project, Sample Person decides to participate
183in the Mozilla Project.183in the Mozilla Project.
184184
185 >>> user_browser.getLink('The Mozilla Project').click()185 >>> user_browser.getLink('The Mozilla Project').click()
186 >>> print user_browser.title186 >>> print(user_browser.title)
187 The Mozilla Project in Launchpad187 The Mozilla Project in Launchpad
188188
189189
@@ -195,8 +195,8 @@ The project registration workflow used to get started at
195location at /projects/+new.195location at /projects/+new.
196196
197 >>> user_browser.open('http://launchpad.test/projects/+new-guided')197 >>> user_browser.open('http://launchpad.test/projects/+new-guided')
198 >>> print user_browser.title198 >>> print(user_browser.title)
199 Register a project in Launchpad...199 Register a project in Launchpad...
200200
201 >>> print user_browser.url201 >>> print(user_browser.url)
202 http://launchpad.test/projects/+new202 http://launchpad.test/projects/+new
diff --git a/lib/lp/registry/stories/product/xx-product-code-trunk.txt b/lib/lp/registry/stories/product/xx-product-code-trunk.txt
index 157bae2..04ba410 100644
--- a/lib/lp/registry/stories/product/xx-product-code-trunk.txt
+++ b/lib/lp/registry/stories/product/xx-product-code-trunk.txt
@@ -24,33 +24,33 @@ Make revisions for the branch so it has a codebrowse link.
24 >>> def print_development_focus(browser):24 >>> def print_development_focus(browser):
25 ... """Print out the development focus part of the project info."""25 ... """Print out the development focus part of the project info."""
26 ... dev_focus = find_tag_by_id(browser.contents, 'development-focus')26 ... dev_focus = find_tag_by_id(browser.contents, 'development-focus')
27 ... print extract_text(dev_focus)27 ... print(extract_text(dev_focus))
28 ... print "Links:"28 ... print("Links:")
29 ... for a in dev_focus.findAll('a'):29 ... for a in dev_focus.findAll('a'):
30 ... for content in a.contents:30 ... for content in a.contents:
31 ... print content31 ... print(content)
32 ... title = a.get('title', '')32 ... title = a.get('title', '')
33 ... print "%s (%s)" % (title, a['href'])33 ... print("%s (%s)" % (title, a['href']))
34 >>> def print_code_trunk(browser):34 >>> def print_code_trunk(browser):
35 ... """Print out code trunk part of the project info."""35 ... """Print out code trunk part of the project info."""
36 ... project_info = find_tag_by_id(browser.contents, 'code-info')36 ... project_info = find_tag_by_id(browser.contents, 'code-info')
37 ... code_trunk = project_info.find(attrs={'id':'code-trunk'})37 ... code_trunk = project_info.find(attrs={'id':'code-trunk'})
38 ... try:38 ... try:
39 ... print extract_text(code_trunk)39 ... print(extract_text(code_trunk))
40 ... except TypeError:40 ... except TypeError:
41 ... return41 ... return
42 ... print "Links:"42 ... print("Links:")
43 ... for a in code_trunk.findAll('a'):43 ... for a in code_trunk.findAll('a'):
44 ... for content in a.contents:44 ... for content in a.contents:
45 ... print content45 ... print(content)
46 ... title = a.get('title', '')46 ... title = a.get('title', '')
47 ... print "%s (%s)" % (title, a['href'])47 ... print("%s (%s)" % (title, a['href']))
48 >>> def print_involvement_portlet(browser):48 >>> def print_involvement_portlet(browser):
49 ... involvement = find_tag_by_id(browser.contents, 'involvement')49 ... involvement = find_tag_by_id(browser.contents, 'involvement')
50 ... for a in involvement.findAll('a'):50 ... for a in involvement.findAll('a'):
51 ... for content in a.contents:51 ... for content in a.contents:
52 ... print content52 ... print(content)
53 ... print a['href']53 ... print(a['href'])
5454
5555
56Projects without development focus branches56Projects without development focus branches
diff --git a/lib/lp/registry/stories/product/xx-product-edit-sourceforge-project.txt b/lib/lp/registry/stories/product/xx-product-edit-sourceforge-project.txt
index 734d465..66bccea 100644
--- a/lib/lp/registry/stories/product/xx-product-edit-sourceforge-project.txt
+++ b/lib/lp/registry/stories/product/xx-product-edit-sourceforge-project.txt
@@ -6,7 +6,7 @@ The setting of the SourceForge project is constrained.
6 ... admin_browser.open('http://launchpad.test/firefox/+edit')6 ... admin_browser.open('http://launchpad.test/firefox/+edit')
7 ... admin_browser.getControl('Sourceforge Project').value = name7 ... admin_browser.getControl('Sourceforge Project').value = name
8 ... admin_browser.getControl('Change').click()8 ... admin_browser.getControl('Change').click()
9 ... print admin_browser.url9 ... print(admin_browser.url)
10 ... print_feedback_messages(admin_browser.contents)10 ... print_feedback_messages(admin_browser.contents)
1111
12 >>> set_sourceforge_project('1234')12 >>> set_sourceforge_project('1234')
diff --git a/lib/lp/registry/stories/product/xx-product-edit.txt b/lib/lp/registry/stories/product/xx-product-edit.txt
index 8f82dd3..1b6a7c6 100644
--- a/lib/lp/registry/stories/product/xx-product-edit.txt
+++ b/lib/lp/registry/stories/product/xx-product-edit.txt
@@ -7,10 +7,10 @@ Page to edit a product - does the page load as the product owner?
7 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')7 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')
8 >>> browser.open('http://launchpad.test/firefox')8 >>> browser.open('http://launchpad.test/firefox')
9 >>> browser.getLink('Change details').click()9 >>> browser.getLink('Change details').click()
10 >>> print browser.url10 >>> print(browser.url)
11 http://launchpad.test/firefox/+edit11 http://launchpad.test/firefox/+edit
1212
13 >>> print browser.title13 >>> print(browser.title)
14 Change Mozilla Firefox's details...14 Change Mozilla Firefox's details...
1515
16We try to change the project related to that product. First with a16We try to change the project related to that product. First with a
@@ -19,7 +19,7 @@ invalid project.
19 >>> browser.getControl('Part of', index=0).value = 'asdasfasd'19 >>> browser.getControl('Part of', index=0).value = 'asdasfasd'
20 >>> browser.getControl(name='field.actions.change').click()20 >>> browser.getControl(name='field.actions.change').click()
21 >>> for message in find_tags_by_class(browser.contents, 'error'):21 >>> for message in find_tags_by_class(browser.contents, 'error'):
22 ... print message.renderContents()22 ... print(message.renderContents())
23 There is 1 error.23 There is 1 error.
24 <BLANKLINE>24 <BLANKLINE>
25 ...25 ...
@@ -30,12 +30,12 @@ Now we try to edit with a project that exists.
3030
31 >>> browser.getControl('Part of', index=0).value = 'gnome'31 >>> browser.getControl('Part of', index=0).value = 'gnome'
32 >>> browser.getControl(name='field.actions.change').click()32 >>> browser.getControl(name='field.actions.change').click()
33 >>> print browser.url33 >>> print(browser.url)
34 http://launchpad.test/firefox34 http://launchpad.test/firefox
3535
36Now we test if we edited it successfully.36Now we test if we edited it successfully.
3737
38 >>> print extract_text(find_tag_by_id(browser.contents, 'partof'))38 >>> print(extract_text(find_tag_by_id(browser.contents, 'partof')))
39 Part of: GNOME39 Part of: GNOME
4040
4141
@@ -50,7 +50,7 @@ But administrators can access the page:
50 >>> admin_browser.url50 >>> admin_browser.url
51 'http://launchpad.test/firefox/+admin'51 'http://launchpad.test/firefox/+admin'
5252
53 >>> print admin_browser.title53 >>> print(admin_browser.title)
54 Administer Mozilla Firefox...54 Administer Mozilla Firefox...
5555
56And in that page they can set aliases to the product.56And in that page they can set aliases to the product.
@@ -82,7 +82,7 @@ First a user adds a product named newproductname.
82 >>> user_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2']82 >>> user_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2']
83 >>> user_browser.getControl(name='field.license_info').value = 'foo'83 >>> user_browser.getControl(name='field.license_info').value = 'foo'
84 >>> user_browser.getControl('Complete Registration').click()84 >>> user_browser.getControl('Complete Registration').click()
85 >>> print user_browser.url85 >>> print(user_browser.url)
86 http://launchpad.test/newproductname86 http://launchpad.test/newproductname
8787
88Then a product named newproductname2.88Then a product named newproductname2.
@@ -98,7 +98,7 @@ Then a product named newproductname2.
98 >>> user_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2']98 >>> user_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2']
99 >>> user_browser.getControl(name='field.license_info').value = 'foo'99 >>> user_browser.getControl(name='field.license_info').value = 'foo'
100 >>> user_browser.getControl('Complete Registration').click()100 >>> user_browser.getControl('Complete Registration').click()
101 >>> print user_browser.url101 >>> print(user_browser.url)
102 http://launchpad.test/newproductname2102 http://launchpad.test/newproductname2
103103
104Now we try to change newproductname2's name to newproductname.104Now we try to change newproductname2's name to newproductname.
@@ -108,7 +108,7 @@ Now we try to change newproductname2's name to newproductname.
108 >>> admin_browser.getControl('Name').value = 'newproductname'108 >>> admin_browser.getControl('Name').value = 'newproductname'
109 >>> admin_browser.getControl(name='field.actions.change').click()109 >>> admin_browser.getControl(name='field.actions.change').click()
110 >>> for message in find_tags_by_class(admin_browser.contents, 'error'):110 >>> for message in find_tags_by_class(admin_browser.contents, 'error'):
111 ... print message.renderContents()111 ... print(message.renderContents())
112 There is 1 error.112 There is 1 error.
113 <BLANKLINE>113 <BLANKLINE>
114 ...114 ...
@@ -121,7 +121,7 @@ will be accepted because there is no product called newproductname3
121121
122 >>> admin_browser.getControl('Name').value = 'newproductname3'122 >>> admin_browser.getControl('Name').value = 'newproductname3'
123 >>> admin_browser.getControl(name='field.actions.change').click()123 >>> admin_browser.getControl(name='field.actions.change').click()
124 >>> print admin_browser.url124 >>> print(admin_browser.url)
125 http://launchpad.test/newproductname3125 http://launchpad.test/newproductname3
126126
127127
@@ -132,7 +132,7 @@ Administrators can change the owner of a project.
132132
133 >>> admin_browser.open(133 >>> admin_browser.open(
134 ... 'http://launchpad.test/newproductname3')134 ... 'http://launchpad.test/newproductname3')
135 >>> print extract_text(find_tag_by_id(admin_browser.contents, 'owner'))135 >>> print(extract_text(find_tag_by_id(admin_browser.contents, 'owner')))
136 Maintainer: No Privileges Person136 Maintainer: No Privileges Person
137 ...137 ...
138138
@@ -140,7 +140,7 @@ Administrators can change the owner of a project.
140 ... 'http://launchpad.test/newproductname3/+admin')140 ... 'http://launchpad.test/newproductname3/+admin')
141 >>> admin_browser.getControl('Maintainer').value = 'cprov'141 >>> admin_browser.getControl('Maintainer').value = 'cprov'
142 >>> admin_browser.getControl(name='field.actions.change').click()142 >>> admin_browser.getControl(name='field.actions.change').click()
143 >>> print extract_text(find_tag_by_id(admin_browser.contents, 'owner'))143 >>> print(extract_text(find_tag_by_id(admin_browser.contents, 'owner')))
144 Maintainer: Celso Providelo144 Maintainer: Celso Providelo
145 ...145 ...
146146
@@ -150,16 +150,16 @@ is created but we allow admins to change it to correct data.
150150
151 >>> admin_browser.open(151 >>> admin_browser.open(
152 ... 'http://launchpad.test/newproductname3')152 ... 'http://launchpad.test/newproductname3')
153 >>> print extract_text(153 >>> print(extract_text(
154 ... find_tag_by_id(admin_browser.contents, 'registration'))154 ... find_tag_by_id(admin_browser.contents, 'registration')))
155 Registered ... by No Privileges Person155 Registered ... by No Privileges Person
156156
157 >>> admin_browser.open(157 >>> admin_browser.open(
158 ... 'http://launchpad.test/newproductname3/+admin')158 ... 'http://launchpad.test/newproductname3/+admin')
159 >>> admin_browser.getControl('Registrant').value = 'cprov'159 >>> admin_browser.getControl('Registrant').value = 'cprov'
160 >>> admin_browser.getControl(name='field.actions.change').click()160 >>> admin_browser.getControl(name='field.actions.change').click()
161 >>> print extract_text(161 >>> print(extract_text(
162 ... find_tag_by_id(admin_browser.contents, 'registration'))162 ... find_tag_by_id(admin_browser.contents, 'registration')))
163 Registered ... by Celso Providelo163 Registered ... by Celso Providelo
164164
165The registrant really should only be a person, not a team, but that165The registrant really should only be a person, not a team, but that
@@ -169,8 +169,8 @@ teams as registrants.
169 >>> admin_browser.open('http://launchpad.test/newproductname3/+admin')169 >>> admin_browser.open('http://launchpad.test/newproductname3/+admin')
170 >>> admin_browser.getControl('Registrant').value = 'registry'170 >>> admin_browser.getControl('Registrant').value = 'registry'
171 >>> admin_browser.getControl('Change').click()171 >>> admin_browser.getControl('Change').click()
172 >>> print extract_text(172 >>> print(extract_text(
173 ... find_tag_by_id(admin_browser.contents, 'registration'))173 ... find_tag_by_id(admin_browser.contents, 'registration')))
174 Registered ... by Registry Administrators174 Registered ... by Registry Administrators
175175
176176
@@ -213,9 +213,9 @@ But registry experts can change a product name and set an alias.
213 >>> browser.getControl('Change').click()213 >>> browser.getControl('Change').click()
214214
215 >>> browser.getLink('Administer').click()215 >>> browser.getLink('Administer').click()
216 >>> print browser.getControl('Name').value216 >>> print(browser.getControl('Name').value)
217 trebuchet217 trebuchet
218 >>> print browser.getControl('Aliases').value218 >>> print(browser.getControl('Aliases').value)
219 trebucket219 trebucket
220220
221221
@@ -241,7 +241,7 @@ The Admins and Registry Experts can deactivate a project.
241 >>> registry_browser.open('http://launchpad.test/bzr/+review-license')241 >>> registry_browser.open('http://launchpad.test/bzr/+review-license')
242 >>> registry_browser.getControl(name='field.active').value = False242 >>> registry_browser.getControl(name='field.active').value = False
243 >>> registry_browser.getControl(name='field.actions.change').click()243 >>> registry_browser.getControl(name='field.actions.change').click()
244 >>> print registry_browser.url244 >>> print(registry_browser.url)
245 http://launchpad.test/bzr245 http://launchpad.test/bzr
246246
247The product overview page should show a notice that a product is247The product overview page should show a notice that a product is
@@ -250,27 +250,27 @@ Admins can still see the product, but regular users can't.
250250
251 >>> registry_browser.open('http://launchpad.test/bzr')251 >>> registry_browser.open('http://launchpad.test/bzr')
252 >>> contents = find_main_content(registry_browser.contents)252 >>> contents = find_main_content(registry_browser.contents)
253 >>> print extract_text(contents.find(id='project-inactive'))253 >>> print(extract_text(contents.find(id='project-inactive')))
254 This project is currently inactive ...254 This project is currently inactive ...
255255
256 >>> admin_browser.open('http://launchpad.test/bzr')256 >>> admin_browser.open('http://launchpad.test/bzr')
257 >>> contents = find_main_content(admin_browser.contents)257 >>> contents = find_main_content(admin_browser.contents)
258 >>> print extract_text(contents.find(id='project-inactive'))258 >>> print(extract_text(contents.find(id='project-inactive')))
259 This project is currently inactive ...259 This project is currently inactive ...
260260
261The product can then be reactivated.261The product can then be reactivated.
262262
263 >>> registry_browser.getLink('Review project').click()263 >>> registry_browser.getLink('Review project').click()
264 >>> print registry_browser.url264 >>> print(registry_browser.url)
265 http://launchpad.test/bzr/+review-license265 http://launchpad.test/bzr/+review-license
266266
267 >>> registry_browser.getControl(name='field.active').value = True267 >>> registry_browser.getControl(name='field.active').value = True
268 >>> registry_browser.getControl(name='field.actions.change').click()268 >>> registry_browser.getControl(name='field.actions.change').click()
269 >>> print registry_browser.url269 >>> print(registry_browser.url)
270 http://launchpad.test/bzr270 http://launchpad.test/bzr
271271
272 >>> contents = find_main_content(registry_browser.contents)272 >>> contents = find_main_content(registry_browser.contents)
273 >>> print contents.find(id='project-inactive')273 >>> print(contents.find(id='project-inactive'))
274 None274 None
275275
276Revert team memberships.276Revert team memberships.
diff --git a/lib/lp/registry/stories/product/xx-product-files.txt b/lib/lp/registry/stories/product/xx-product-files.txt
index fff1d46..673a34c 100644
--- a/lib/lp/registry/stories/product/xx-product-files.txt
+++ b/lib/lp/registry/stories/product/xx-product-files.txt
@@ -9,7 +9,7 @@ Any user can see that a project with no releases has no downloads.
99
10 >>> anon_browser.open('http://launchpad.test/aptoncd')10 >>> anon_browser.open('http://launchpad.test/aptoncd')
11 >>> content = find_tag_by_id(anon_browser.contents, 'downloads')11 >>> content = find_tag_by_id(anon_browser.contents, 'downloads')
12 >>> print extract_text(content)12 >>> print(extract_text(content))
13 Downloads13 Downloads
14 APTonCD does not have any download files registered with Launchpad.14 APTonCD does not have any download files registered with Launchpad.
1515
@@ -19,7 +19,7 @@ downloadable files.
1919
20 >>> anon_browser.open('http://launchpad.test/thunderbird')20 >>> anon_browser.open('http://launchpad.test/thunderbird')
21 >>> content = find_tag_by_id(anon_browser.contents, 'downloads')21 >>> content = find_tag_by_id(anon_browser.contents, 'downloads')
22 >>> print extract_text(content)22 >>> print(extract_text(content))
23 Downloads23 Downloads
24 Mozilla Thunderbird does not have any download files24 Mozilla Thunderbird does not have any download files
25 registered with Launchpad.25 registered with Launchpad.
@@ -30,14 +30,14 @@ release to add download files.
3030
31 >>> anon_browser.open('http://launchpad.test/firefox')31 >>> anon_browser.open('http://launchpad.test/firefox')
32 >>> content = find_tag_by_id(anon_browser.contents, 'downloads')32 >>> content = find_tag_by_id(anon_browser.contents, 'downloads')
33 >>> print extract_text(content)33 >>> print(extract_text(content))
34 Downloads34 Downloads
35 Latest version is 0.9.235 Latest version is 0.9.2
36 firefox_0.9.2.orig.tar.gz...36 firefox_0.9.2.orig.tar.gz...
3737
38 >>> anon_browser.getLink('All downloads').click()38 >>> anon_browser.getLink('All downloads').click()
39 >>> print extract_text(39 >>> print(extract_text(
40 ... find_tag_by_id(anon_browser.contents, 'project-downloads'))40 ... find_tag_by_id(anon_browser.contents, 'project-downloads')))
41 0.9.2 (One (secure) Tree Hill) release from the trunk series41 0.9.2 (One (secure) Tree Hill) release from the trunk series
42 released 2004-10-1542 released 2004-10-15
43 Release information43 Release information
@@ -56,7 +56,7 @@ otherwise.
56 ... name='prop-prod', information_type=InformationType.PROPRIETARY)56 ... name='prop-prod', information_type=InformationType.PROPRIETARY)
57 >>> logout()57 >>> logout()
58 >>> admin_browser.open('http://launchpad.test/prop-prod')58 >>> admin_browser.open('http://launchpad.test/prop-prod')
59 >>> print find_tag_by_id(admin_browser.contents, 'downloads')59 >>> print(find_tag_by_id(admin_browser.contents, 'downloads'))
60 None60 None
6161
6262
@@ -71,7 +71,7 @@ the delete options.
71 'http://launchpad.test/firefox/+download'71 'http://launchpad.test/firefox/+download'
72 >>> content = find_main_content(anon_browser.contents)72 >>> content = find_main_content(anon_browser.contents)
73 >>> row = content.find('table').find('tr')73 >>> row = content.find('table').find('tr')
74 >>> print extract_text(row)74 >>> print(extract_text(row))
75 File75 File
76 Description76 Description
77 Downloads77 Downloads
@@ -85,7 +85,7 @@ Again, for an authenticated user who is not the firefox product owner.
85 'http://launchpad.test/firefox/+download'85 'http://launchpad.test/firefox/+download'
86 >>> content = find_main_content(non_owner.contents)86 >>> content = find_main_content(non_owner.contents)
87 >>> row = content.find('table').find('tr')87 >>> row = content.find('table').find('tr')
88 >>> print extract_text(row)88 >>> print(extract_text(row))
89 File89 File
90 Description90 Description
91 Downloads91 Downloads
@@ -99,7 +99,7 @@ Now, login as a firefox admin and see the delete fields.
99 'http://launchpad.test/firefox/+download'99 'http://launchpad.test/firefox/+download'
100 >>> content = find_main_content(firefox_owner.contents)100 >>> content = find_main_content(firefox_owner.contents)
101 >>> row = content.find('table').find('tr')101 >>> row = content.find('table').find('tr')
102 >>> print extract_text(row)102 >>> print(extract_text(row))
103 File103 File
104 Description104 Description
105 Downloads105 Downloads
@@ -110,11 +110,11 @@ A project owner should not see the delete button when there are no files.
110 >>> tbird_owner = setupBrowser(110 >>> tbird_owner = setupBrowser(
111 ... auth='Basic foo.bar@canonical.com:test')111 ... auth='Basic foo.bar@canonical.com:test')
112 >>> tbird_owner.open('http://launchpad.test/thunderbird/+download')112 >>> tbird_owner.open('http://launchpad.test/thunderbird/+download')
113 >>> print tbird_owner.title113 >>> print(tbird_owner.title)
114 Mozilla Thunderbird project files...114 Mozilla Thunderbird project files...
115115
116 >>> main_content = find_main_content(tbird_owner.contents)116 >>> main_content = find_main_content(tbird_owner.contents)
117 >>> print extract_text(main_content)117 >>> print(extract_text(main_content))
118 Download project files118 Download project files
119 No download files exist for this project...119 No download files exist for this project...
120 Add download file to the trunk series for release: 0.8120 Add download file to the trunk series for release: 0.8
@@ -134,7 +134,7 @@ add download files for each release in that series is presented.
134134
135 >>> firefox_owner.open('http://launchpad.test/firefox/+download')135 >>> firefox_owner.open('http://launchpad.test/firefox/+download')
136 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):136 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):
137 ... print extract_text(tag)137 ... print(extract_text(tag))
138 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9138 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9
139 Add download file to the 1.0 series for release: 1.0.0139 Add download file to the 1.0 series for release: 1.0.0
140140
@@ -149,7 +149,7 @@ series should not show up in the list.
149 >>> firefox_owner.getControl('Register Series').click()149 >>> firefox_owner.getControl('Register Series').click()
150 >>> firefox_owner.open('http://launchpad.test/firefox/+download')150 >>> firefox_owner.open('http://launchpad.test/firefox/+download')
151 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):151 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):
152 ... print extract_text(tag)152 ... print(extract_text(tag))
153 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9153 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9
154 Add download file to the 1.0 series for release: 1.0.0154 Add download file to the 1.0 series for release: 1.0.0
155155
@@ -166,11 +166,11 @@ the list.
166 >>> firefox_owner.getLink('Create release').click()166 >>> firefox_owner.getLink('Create release').click()
167 >>> firefox_owner.getControl('Date released').value = '2000-01-01'167 >>> firefox_owner.getControl('Date released').value = '2000-01-01'
168 >>> firefox_owner.getControl('Create release').click()168 >>> firefox_owner.getControl('Create release').click()
169 >>> print firefox_owner.url169 >>> print(firefox_owner.url)
170 http://launchpad.test/firefox/+milestone/3.14159170 http://launchpad.test/firefox/+milestone/3.14159
171 >>> firefox_owner.open('http://launchpad.test/firefox/+download')171 >>> firefox_owner.open('http://launchpad.test/firefox/+download')
172 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):172 >>> for tag in find_tags_by_class(firefox_owner.contents, 'add-files'):
173 ... print extract_text(tag)173 ... print(extract_text(tag))
174 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9174 Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9
175 Add download file to the 3.0 series for release: 3.14159175 Add download file to the 3.0 series for release: 3.14159
176 Add download file to the 1.0 series for release: 1.0.0176 Add download file to the 1.0 series for release: 1.0.0
@@ -199,7 +199,7 @@ To add a download file the release version link is used.
199199
200 >>> firefox_owner.open('http://launchpad.test/firefox/+download')200 >>> firefox_owner.open('http://launchpad.test/firefox/+download')
201 >>> firefox_owner.getLink('1.0.0').click()201 >>> firefox_owner.getLink('1.0.0').click()
202 >>> print firefox_owner.title202 >>> print(firefox_owner.title)
203 Add a download file to Mozilla Firefox...203 Add a download file to Mozilla Firefox...
204204
205Ensure a non-owner doesn't see the 'Add download file' link after205Ensure a non-owner doesn't see the 'Add download file' link after
@@ -219,7 +219,7 @@ To add a download file the +adddownloadfile page is accessed.
219The maximum size of the upload file is shown on the page.219The maximum size of the upload file is shown on the page.
220220
221 >>> content = find_main_content(firefox_owner.contents)221 >>> content = find_main_content(firefox_owner.contents)
222 >>> print content222 >>> print(content)
223 <...223 <...
224 ...You may upload files up to 1.0 GiB...224 ...You may upload files up to 1.0 GiB...
225225
@@ -260,7 +260,7 @@ user to see.
260 >>> anon_browser.open('http://launchpad.test/firefox/+download')260 >>> anon_browser.open('http://launchpad.test/firefox/+download')
261 >>> content = find_main_content(anon_browser.contents)261 >>> content = find_main_content(anon_browser.contents)
262 >>> for tr in content.findAll('table')[1].findAll('tr'):262 >>> for tr in content.findAll('table')[1].findAll('tr'):
263 ... print extract_text(tr)263 ... print(extract_text(tr))
264 File Description Downloads264 File Description Downloads
265 bar.txt (md5) Bar installer -265 bar.txt (md5) Bar installer -
266 foo.txt (md5, sig) Foo installer -266 foo.txt (md5, sig) Foo installer -
@@ -274,7 +274,7 @@ an admin can also delete a release file.
274 >>> checkbox.value = checkbox.options274 >>> checkbox.value = checkbox.options
275 >>> table = find_tag_by_id(admin_browser.contents, 'downloads')275 >>> table = find_tag_by_id(admin_browser.contents, 'downloads')
276 >>> for tr in table.findAll('tr'):276 >>> for tr in table.findAll('tr'):
277 ... print extract_text(tr)277 ... print(extract_text(tr))
278 File Description Downloads Delete278 File Description Downloads Delete
279 bar.txt (md5) Bar installer -279 bar.txt (md5) Bar installer -
280 foo.txt (md5, sig) Foo installer -280 foo.txt (md5, sig) Foo installer -
@@ -285,7 +285,7 @@ an admin can also delete a release file.
285 1 file has been deleted.285 1 file has been deleted.
286 >>> table = find_tag_by_id(admin_browser.contents, 'downloads')286 >>> table = find_tag_by_id(admin_browser.contents, 'downloads')
287 >>> for tr in table.findAll('tr'):287 >>> for tr in table.findAll('tr'):
288 ... print extract_text(tr)288 ... print(extract_text(tr))
289 File Description Downloads Delete289 File Description Downloads Delete
290 foo.txt (md5, sig) Foo installer -290 foo.txt (md5, sig) Foo installer -
291291
@@ -297,7 +297,7 @@ the md5 digest of the file, and the signature that we uploaded.
297 >>> non_owner.url297 >>> non_owner.url
298 'http://launchpad.test/firefox/+download'298 'http://launchpad.test/firefox/+download'
299 >>> content = find_main_content(non_owner.contents)299 >>> content = find_main_content(non_owner.contents)
300 >>> print content300 >>> print(content)
301 <...301 <...
302 ...foo.txt...md5...sig...Foo installer...302 ...foo.txt...md5...sig...Foo installer...
303303
@@ -388,7 +388,7 @@ are listed within series in reverse chronological order, except
388 >>> for row in rows[1:]:388 >>> for row in rows[1:]:
389 ... a_list = row.findAll('a')389 ... a_list = row.findAll('a')
390 ... if len(a_list) > 0:390 ... if len(a_list) > 0:
391 ... print a_list[0].string391 ... print(a_list[0].string)
392 firefox_0.9.2.orig.tar.gz392 firefox_0.9.2.orig.tar.gz
393 foo09.txt393 foo09.txt
394 foo3.txt394 foo3.txt
@@ -423,7 +423,7 @@ XXX Mon May 7 10:02:49 2007 -- bac
423 ... if key.lower() == "location":423 ... if key.lower() == "location":
424 ... redirect_url = value424 ... redirect_url = value
425 ... break425 ... break
426 >>> print urlopen(redirect_url).read()426 >>> print(urlopen(redirect_url).read())
427 Foo2 installer package...427 Foo2 installer package...
428428
429Delete the file foo2.txt.429Delete the file foo2.txt.
@@ -449,7 +449,7 @@ Ensure the file is no longer listed.
449 >>> for row in rows[1:]:449 >>> for row in rows[1:]:
450 ... a_list = row.findAll('a')450 ... a_list = row.findAll('a')
451 ... if len(a_list) > 0:451 ... if len(a_list) > 0:
452 ... print a_list[0].string452 ... print(a_list[0].string)
453 firefox_0.9.2.orig.tar.gz453 firefox_0.9.2.orig.tar.gz
454 foo09.txt454 foo09.txt
455 foo3.txt455 foo3.txt
@@ -465,7 +465,7 @@ Non-administrators do not have the delete option.
465 >>> non_owner.open('http://launchpad.test/firefox/trunk/0.9')465 >>> non_owner.open('http://launchpad.test/firefox/trunk/0.9')
466 >>> table = find_tag_by_id(non_owner.contents, 'downloads')466 >>> table = find_tag_by_id(non_owner.contents, 'downloads')
467 >>> for tr in table.findAll('tr'):467 >>> for tr in table.findAll('tr'):
468 ... print extract_text(tr)468 ... print(extract_text(tr))
469 File Description Downloads469 File Description Downloads
470 foo09.txt (md5) Foo09 installer -470 foo09.txt (md5) Foo09 installer -
471471
@@ -484,7 +484,7 @@ so it is not shown.
484 >>> firefox_owner.open('http://launchpad.test/firefox/trunk/0.9')484 >>> firefox_owner.open('http://launchpad.test/firefox/trunk/0.9')
485 >>> table = find_tag_by_id(firefox_owner.contents, 'downloads')485 >>> table = find_tag_by_id(firefox_owner.contents, 'downloads')
486 >>> for tr in table.findAll('tr'):486 >>> for tr in table.findAll('tr'):
487 ... print extract_text(tr)487 ... print(extract_text(tr))
488 File Description Downloads Delete488 File Description Downloads Delete
489 foo09.txt (md5) Foo09 installer -489 foo09.txt (md5) Foo09 installer -
490490
diff --git a/lib/lp/registry/stories/product/xx-product-index.txt b/lib/lp/registry/stories/product/xx-product-index.txt
index 72e1d36..28e7079 100644
--- a/lib/lp/registry/stories/product/xx-product-index.txt
+++ b/lib/lp/registry/stories/product/xx-product-index.txt
@@ -11,7 +11,7 @@ The product page has a link to help translate it.
11 >>> link = user_browser.getLink(11 >>> link = user_browser.getLink(
12 ... url='http://translations.launchpad.test/evolution')12 ... url='http://translations.launchpad.test/evolution')
13 >>> link.click()13 >>> link.click()
14 >>> print user_browser.title14 >>> print(user_browser.title)
15 Translations : Evolution15 Translations : Evolution
1616
1717
@@ -20,7 +20,7 @@ Links and Programming languages
2020
21Evolution has no external links.21Evolution has no external links.
2222
23 >>> print find_tag_by_id(user_browser.contents, 'external-links-heading')23 >>> print(find_tag_by_id(user_browser.contents, 'external-links-heading'))
24 None24 None
2525
26Now update Tomcat to actually have this data:26Now update Tomcat to actually have this data:
@@ -51,14 +51,14 @@ Let's check it out:
51 >>> content = find_main_content(browser.contents)51 >>> content = find_main_content(browser.contents)
52 >>> external_links = find_tag_by_id(content, 'external-links')52 >>> external_links = find_tag_by_id(content, 'external-links')
53 >>> for link in external_links.findAll('a'):53 >>> for link in external_links.findAll('a'):
54 ... print extract_text(link), link['href']54 ... print(extract_text(link), link['href'])
55 Home page http://home.page/55 Home page http://home.page/
56 Sourceforge project http://sourceforge.net/projects/sf-tomcat56 Sourceforge project http://sourceforge.net/projects/sf-tomcat
57 Wiki http://wiki.url/57 Wiki http://wiki.url/
58 Screenshots http://screenshots.url/58 Screenshots http://screenshots.url/
59 External downloads http://download.url/59 External downloads http://download.url/
6060
61 >>> print extract_text(find_tag_by_id(content, 'product-languages'))61 >>> print(extract_text(find_tag_by_id(content, 'product-languages')))
62 Programming languages: C++,Xenon and Purple62 Programming languages: C++,Xenon and Purple
6363
64When the sourceforge URL is identical to the homepage, we omit the homepage:64When the sourceforge URL is identical to the homepage, we omit the homepage:
@@ -76,7 +76,7 @@ When the sourceforge URL is identical to the homepage, we omit the homepage:
76 >>> content = find_main_content(browser.contents)76 >>> content = find_main_content(browser.contents)
77 >>> external_links = find_tag_by_id(content, 'external-links')77 >>> external_links = find_tag_by_id(content, 'external-links')
78 >>> for link in external_links.findAll('a'):78 >>> for link in external_links.findAll('a'):
79 ... print extract_text(link), link['href']79 ... print(extract_text(link), link['href'])
80 Sourceforge project http://sourceforge.net/projects/sf-tomcat80 Sourceforge project http://sourceforge.net/projects/sf-tomcat
81 Wiki http://wiki.url/81 Wiki http://wiki.url/
82 Screenshots http://screenshots.url/82 Screenshots http://screenshots.url/
@@ -101,8 +101,8 @@ been reviewed by a Launchpad administrator will be displayed as
101Any user can see that the project's licence has not been reviewed.101Any user can see that the project's licence has not been reviewed.
102102
103 >>> user_browser.open('http://launchpad.test/thunderbird')103 >>> user_browser.open('http://launchpad.test/thunderbird')
104 >>> print extract_text(104 >>> print(extract_text(
105 ... find_tag_by_id(user_browser.contents, 'license-status'))105 ... find_tag_by_id(user_browser.contents, 'license-status')))
106 This projectā€™s licence has not been reviewed.106 This projectā€™s licence has not been reviewed.
107107
108Changing the state to reviewed but not approved results in the project108Changing the state to reviewed but not approved results in the project
@@ -129,11 +129,11 @@ direct the owner to purchase a subscription.
129 >>> transaction.commit()129 >>> transaction.commit()
130 >>> logout()130 >>> logout()
131 >>> owner_browser.open('http://launchpad.test/firefox')131 >>> owner_browser.open('http://launchpad.test/firefox')
132 >>> print find_tag_by_id(owner_browser.contents, 'license-status')132 >>> print(find_tag_by_id(owner_browser.contents, 'license-status'))
133 <...This projectā€™s licence is proprietary...133 <...This projectā€™s licence is proprietary...
134134
135 >>> print find_tag_by_id(owner_browser.contents,135 >>> print(find_tag_by_id(owner_browser.contents,
136 ... 'portlet-requires-subscription')136 ... 'portlet-requires-subscription'))
137 <div...Purchasing a commercial subscription is required...</div>137 <div...Purchasing a commercial subscription is required...</div>
138138
139Any user can see that the project's licence is proprietary.139Any user can see that the project's licence is proprietary.
@@ -141,8 +141,8 @@ Any user can see that the project's licence is proprietary.
141 >>> user_browser.open('http://launchpad.test/firefox')141 >>> user_browser.open('http://launchpad.test/firefox')
142 >>> user_browser.contents142 >>> user_browser.contents
143 '<...This project&rsquo;s licence is proprietary...143 '<...This project&rsquo;s licence is proprietary...
144 >>> print extract_text(144 >>> print(extract_text(
145 ... find_tag_by_id(user_browser.contents, 'licences'))145 ... find_tag_by_id(user_browser.contents, 'licences')))
146 Licence:146 Licence:
147 Other/Proprietary (Internal project.)147 Other/Proprietary (Internal project.)
148 Commercial subscription expires ...148 Commercial subscription expires ...
@@ -150,8 +150,8 @@ Any user can see that the project's licence is proprietary.
150150
151A non-owner does not see that a commercial subscription is due.151A non-owner does not see that a commercial subscription is due.
152152
153 >>> print find_tag_by_id(user_browser.contents,153 >>> print(find_tag_by_id(user_browser.contents,
154 ... 'portlet-requires-subscription')154 ... 'portlet-requires-subscription'))
155 None155 None
156156
157If the project qualifies for free hosting, tghe portlet is not displayed.157If the project qualifies for free hosting, tghe portlet is not displayed.
@@ -160,8 +160,8 @@ If the project qualifies for free hosting, tghe portlet is not displayed.
160 >>> flush_database_updates()160 >>> flush_database_updates()
161 >>> transaction.commit()161 >>> transaction.commit()
162 >>> owner_browser.open('http://launchpad.test/firefox')162 >>> owner_browser.open('http://launchpad.test/firefox')
163 >>> print find_tag_by_id(owner_browser.contents,163 >>> print(find_tag_by_id(owner_browser.contents,
164 ... 'portlet-requires-subscription')164 ... 'portlet-requires-subscription'))
165 None165 None
166166
167If the project's licence is open source, the licence status is not167If the project's licence is open source, the licence status is not
@@ -169,10 +169,10 @@ displayed on the index page, since most projects fall into this
169category.169category.
170170
171 >>> user_browser.open('http://launchpad.test/firefox')171 >>> user_browser.open('http://launchpad.test/firefox')
172 >>> print find_tag_by_id(owner_browser.contents, 'license-status')172 >>> print(find_tag_by_id(owner_browser.contents, 'license-status'))
173 None173 None
174 >>> print extract_text(174 >>> print(extract_text(
175 ... find_tag_by_id(user_browser.contents, 'licences'))175 ... find_tag_by_id(user_browser.contents, 'licences')))
176 Licence:176 Licence:
177 GNU GPL v2177 GNU GPL v2
178 Commercial subscription expires ...178 Commercial subscription expires ...
@@ -200,8 +200,8 @@ Enable the subscription.
200200
201 >>> owner_browser = setupBrowser(auth='Basic bac@canonical.com:test')201 >>> owner_browser = setupBrowser(auth='Basic bac@canonical.com:test')
202 >>> owner_browser.open('http://launchpad.test/mega-money-maker')202 >>> owner_browser.open('http://launchpad.test/mega-money-maker')
203 >>> print extract_text(find_tag_by_id(owner_browser.contents,203 >>> print(extract_text(find_tag_by_id(owner_browser.contents,
204 ... 'commercial_subscription'))204 ... 'commercial_subscription')))
205 Commercial subscription expires ...205 Commercial subscription expires ...
206206
207Commercial team members will see the expiration information.207Commercial team members will see the expiration information.
@@ -209,15 +209,15 @@ Commercial team members will see the expiration information.
209 >>> comm_browser = setupBrowser(209 >>> comm_browser = setupBrowser(
210 ... auth='Basic commercial-member@canonical.com:test')210 ... auth='Basic commercial-member@canonical.com:test')
211 >>> comm_browser.open('http://launchpad.test/mega-money-maker')211 >>> comm_browser.open('http://launchpad.test/mega-money-maker')
212 >>> print extract_text(find_tag_by_id(comm_browser.contents,212 >>> print(extract_text(find_tag_by_id(comm_browser.contents,
213 ... 'commercial_subscription'))213 ... 'commercial_subscription')))
214 Commercial subscription expires ...214 Commercial subscription expires ...
215215
216Launchpad administrators will see the expiration information.216Launchpad administrators will see the expiration information.
217217
218 >>> admin_browser.open('http://launchpad.test/mega-money-maker')218 >>> admin_browser.open('http://launchpad.test/mega-money-maker')
219 >>> print extract_text(find_tag_by_id(admin_browser.contents,219 >>> print(extract_text(find_tag_by_id(admin_browser.contents,
220 ... 'commercial_subscription'))220 ... 'commercial_subscription')))
221 Commercial subscription expires ...221 Commercial subscription expires ...
222222
223223
@@ -227,8 +227,8 @@ Development
227The project page shows the series that is the focus of development.227The project page shows the series that is the focus of development.
228228
229 >>> anon_browser.open('http://launchpad.test/firefox')229 >>> anon_browser.open('http://launchpad.test/firefox')
230 >>> print extract_text(230 >>> print(extract_text(
231 ... find_tag_by_id(anon_browser.contents, 'development-focus'))231 ... find_tag_by_id(anon_browser.contents, 'development-focus')))
232 trunk series is the current focus of development.232 trunk series is the current focus of development.
233233
234The page has a link to view the project's milestones.234The page has a link to view the project's milestones.
@@ -252,7 +252,7 @@ home page.
252252
253 >>> Product.byName("firefox").setAliases(['iceweasel', 'snowchicken'])253 >>> Product.byName("firefox").setAliases(['iceweasel', 'snowchicken'])
254 >>> anon_browser.open('http://launchpad.test/firefox')254 >>> anon_browser.open('http://launchpad.test/firefox')
255 >>> print extract_text(find_tag_by_id(anon_browser.contents, 'aliases'))255 >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'aliases')))
256 Also known as: iceweasel, snowchicken256 Also known as: iceweasel, snowchicken
257257
258258
@@ -262,8 +262,8 @@ Ubuntu packaging
262If a product is packaged in Ubuntu the links are shown.262If a product is packaged in Ubuntu the links are shown.
263263
264 >>> user_browser.open('http://launchpad.test/firefox')264 >>> user_browser.open('http://launchpad.test/firefox')
265 >>> print extract_text(265 >>> print(extract_text(
266 ... find_tag_by_id(user_browser.contents, 'portlet-packages'))266 ... find_tag_by_id(user_browser.contents, 'portlet-packages')))
267 All packages267 All packages
268 Packages in Distributions268 Packages in Distributions
269 mozilla-firefox source package in Warty Version 0.9 uploaded on...269 mozilla-firefox source package in Warty Version 0.9 uploaded on...
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 93e9bbf..54261e5 100644
--- a/lib/lp/registry/stories/product/xx-product-package-pages.txt
+++ b/lib/lp/registry/stories/product/xx-product-package-pages.txt
@@ -6,16 +6,16 @@ each.
66
7 >>> anon_browser.open(7 >>> anon_browser.open(
8 ... 'http://launchpad.test/evolution/+packages')8 ... 'http://launchpad.test/evolution/+packages')
9 >>> print anon_browser.title9 >>> print(anon_browser.title)
10 Linked packages ...10 Linked packages ...
11 >>> print extract_text(11 >>> print(extract_text(
12 ... find_tag_by_id(anon_browser.contents, 'distribution-series'))12 ... find_tag_by_id(anon_browser.contents, 'distribution-series')))
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(url='/ubuntu/warty/+source/evolution').click()
17 >>> print extract_text(17 >>> print(extract_text(
18 ... find_tag_by_id(anon_browser.contents, 'maincontent').h1)18 ... find_tag_by_id(anon_browser.contents, 'maincontent').h1))
19 evolution source package in Warty19 evolution source package in Warty
2020
21It can also show the packages by product series. And if you have permission21It can also show the packages by product series. And if you have permission
@@ -25,10 +25,10 @@ Evolution.
2525
26 >>> evo_owner = setupBrowser(auth='Basic mark@example.com:test')26 >>> evo_owner = setupBrowser(auth='Basic mark@example.com:test')
27 >>> evo_owner.open('http://launchpad.test/evolution/+packages')27 >>> evo_owner.open('http://launchpad.test/evolution/+packages')
28 >>> print evo_owner.title28 >>> print(evo_owner.title)
29 Linked packages ...29 Linked packages ...
30 >>> print extract_text(find_tag_by_id(30 >>> print(extract_text(find_tag_by_id(
31 ... evo_owner.contents, 'packages-trunk'))31 ... evo_owner.contents, 'packages-trunk')))
32 Distribution Distribution series Source package Version32 Distribution Distribution series Source package Version
33 Ubuntu Warty (4.10) evolution Remove...33 Ubuntu Warty (4.10) evolution Remove...
34 Ubuntu Hoary (5.04) evolution 1.0 Remove...34 Ubuntu Hoary (5.04) evolution 1.0 Remove...
@@ -39,7 +39,7 @@ Evolution.
39Any logged in users can still see the links to create a packaging link.39Any logged in users can still see the links to create a packaging link.
4040
41 >>> user_browser.open('http://launchpad.test/evolution/+packages')41 >>> user_browser.open('http://launchpad.test/evolution/+packages')
42 >>> print user_browser.getLink(url='/evolution/trunk/+ubuntupkg').url42 >>> print(user_browser.getLink(url='/evolution/trunk/+ubuntupkg').url)
43 http://launchpad.test/evolution/trunk/+ubuntupkg43 http://launchpad.test/evolution/trunk/+ubuntupkg
4444
45 >>> anon_browser.open('http://launchpad.test/evolution/+packages')45 >>> anon_browser.open('http://launchpad.test/evolution/+packages')
@@ -56,16 +56,16 @@ Packaging links can be deleted if they were created in error.
5656
57 >>> evo_owner.getLink(57 >>> evo_owner.getLink(
58 ... url='/ubuntu/warty/+source/evolution/+remove-packaging').click()58 ... url='/ubuntu/warty/+source/evolution/+remove-packaging').click()
59 >>> print evo_owner.title59 >>> print(evo_owner.title)
60 Unlink an upstream project...60 Unlink an upstream project...
61 >>> evo_owner.getControl('Unlink').click()61 >>> evo_owner.getControl('Unlink').click()
62 >>> print evo_owner.title62 >>> print(evo_owner.title)
63 Linked packages...63 Linked packages...
6464
65 >>> print_feedback_messages(evo_owner.contents)65 >>> print_feedback_messages(evo_owner.contents)
66 Removed upstream association between Evolution trunk series and Warty.66 Removed upstream association between Evolution trunk series and Warty.
6767
68 >>> print extract_text(find_tag_by_id(68 >>> print(extract_text(find_tag_by_id(
69 ... evo_owner.contents, 'packages-trunk'))69 ... evo_owner.contents, 'packages-trunk')))
70 Distribution Distribution series Source package Version70 Distribution Distribution series Source package Version
71 Ubuntu Hoary (5.04) evolution 1.0 Remove...71 Ubuntu Hoary (5.04) evolution 1.0 Remove...
diff --git a/lib/lp/registry/stories/product/xx-product-rdf.txt b/lib/lp/registry/stories/product/xx-product-rdf.txt
index 711ceeb..32219d1 100644
--- a/lib/lp/registry/stories/product/xx-product-rdf.txt
+++ b/lib/lp/registry/stories/product/xx-product-rdf.txt
@@ -3,7 +3,7 @@ We export DOAP RDF metadata for products from a link in the
33
4 >>> anon_browser.open("http://launchpad.test/firefox")4 >>> anon_browser.open("http://launchpad.test/firefox")
5 >>> anon_browser.getLink("RDF metadata").click()5 >>> anon_browser.getLink("RDF metadata").click()
6 >>> print anon_browser.contents6 >>> print(anon_browser.contents)
7 <?xml version="1.0" encoding="utf-8"...?>7 <?xml version="1.0" encoding="utf-8"...?>
8 <rdf:RDF ...xmlns:lp="https://launchpad.net/rdf/launchpad#"...>8 <rdf:RDF ...xmlns:lp="https://launchpad.net/rdf/launchpad#"...>
9 <lp:Product>9 <lp:Product>
@@ -26,5 +26,5 @@ And it's valid XML and RDF:
2626
27 >>> from xml.dom.minidom import parseString27 >>> from xml.dom.minidom import parseString
28 >>> document = parseString(str(anon_browser.contents))28 >>> document = parseString(str(anon_browser.contents))
29 >>> print document.documentElement.nodeName29 >>> print(document.documentElement.nodeName)
30 rdf:RDF30 rdf:RDF
diff --git a/lib/lp/registry/stories/product/xx-product-reassignment-and-milestones.txt b/lib/lp/registry/stories/product/xx-product-reassignment-and-milestones.txt
index c04c1dd..abb9ff1 100644
--- a/lib/lp/registry/stories/product/xx-product-reassignment-and-milestones.txt
+++ b/lib/lp/registry/stories/product/xx-product-reassignment-and-milestones.txt
@@ -9,7 +9,7 @@ even if the user was trying to set the milestone value.
9 >>> browser.getControl("Save Changes").click()9 >>> browser.getControl("Save Changes").click()
1010
11 >>> for message in find_tags_by_class(browser.contents, 'message'):11 >>> for message in find_tags_by_class(browser.contents, 'message'):
12 ... print message.renderContents()12 ... print(message.renderContents())
13 The milestone setting was ignored because you reassigned the bug13 The milestone setting was ignored because you reassigned the bug
14 to...Evolution...14 to...Evolution...
1515
@@ -37,6 +37,6 @@ milestone value, if one was set.
37 >>> browser.getControl("Save Changes").click()37 >>> browser.getControl("Save Changes").click()
3838
39 >>> for message in find_tags_by_class(browser.contents, 'message'):39 >>> for message in find_tags_by_class(browser.contents, 'message'):
40 ... print message.renderContents()40 ... print(message.renderContents())
41 The Mozilla Firefox 1.0 milestone setting has been removed41 The Mozilla Firefox 1.0 milestone setting has been removed
42 because you reassigned the bug to Evolution.42 because you reassigned the bug to Evolution.
diff --git a/lib/lp/registry/stories/product/xx-productset.txt b/lib/lp/registry/stories/product/xx-productset.txt
index 8d24a47..c13ab3a 100644
--- a/lib/lp/registry/stories/product/xx-productset.txt
+++ b/lib/lp/registry/stories/product/xx-productset.txt
@@ -33,7 +33,7 @@ A member of the Launchpad registry experts team may successfully access the
33 >>> registry_browser.getLink("Review projects").click()33 >>> registry_browser.getLink("Review projects").click()
34 >>> registry_browser.url34 >>> registry_browser.url
35 'http://launchpad.test/projects/+review-licenses'35 'http://launchpad.test/projects/+review-licenses'
36 >>> print registry_browser.title36 >>> print(registry_browser.title)
37 Review projects...37 Review projects...
3838
3939
@@ -43,13 +43,13 @@ View all projects
43The unprivileged user can see "+all".43The unprivileged user can see "+all".
4444
45 >>> user_browser.open('http://launchpad.test/projects/+all')45 >>> user_browser.open('http://launchpad.test/projects/+all')
46 >>> print user_browser.title46 >>> print(user_browser.title)
47 Projects registered in Launchpad...47 Projects registered in Launchpad...
4848
49The commercial user can also view "+all".49The commercial user can also view "+all".
5050
51 >>> registry_browser.open('http://launchpad.test/projects/+all')51 >>> registry_browser.open('http://launchpad.test/projects/+all')
52 >>> print registry_browser.title52 >>> print(registry_browser.title)
53 Projects registered in Launchpad...53 Projects registered in Launchpad...
5454
5555
@@ -59,17 +59,17 @@ Create a project
59The unprivileged user can see "+new".59The unprivileged user can see "+new".
6060
61 >>> user_browser.open('http://launchpad.test/projects/+new')61 >>> user_browser.open('http://launchpad.test/projects/+new')
62 >>> print user_browser.title62 >>> print(user_browser.title)
63 Register a project in Launchpad...63 Register a project in Launchpad...
6464
65The commercial user can also view "+new".65The commercial user can also view "+new".
6666
67 >>> registry_browser.open('http://launchpad.test/projects/+new')67 >>> registry_browser.open('http://launchpad.test/projects/+new')
68 >>> print registry_browser.title68 >>> print(registry_browser.title)
69 Register a project in Launchpad...69 Register a project in Launchpad...
7070
71The commercial user can also view "+new".71The commercial user can also view "+new".
7272
73 >>> registry_browser.open('http://launchpad.test/projects/+new')73 >>> registry_browser.open('http://launchpad.test/projects/+new')
74 >>> print registry_browser.title74 >>> print(registry_browser.title)
75 Register a project in Launchpad...75 Register a project in Launchpad...
diff --git a/lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt b/lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt
index 082bdb6..e33c07c 100644
--- a/lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt
+++ b/lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt
@@ -22,22 +22,22 @@ release in the series.
22 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')22 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')
23 >>> browser.open('http://launchpad.test/firefox/+milestone/1.0')23 >>> browser.open('http://launchpad.test/firefox/+milestone/1.0')
24 >>> browser.getLink('Create release').click()24 >>> browser.getLink('Create release').click()
25 >>> print browser.url25 >>> print(browser.url)
26 http://launchpad.test/firefox/+milestone/1.0/+addrelease26 http://launchpad.test/firefox/+milestone/1.0/+addrelease
2727
28 >>> print browser.title28 >>> print(browser.title)
29 Create a new release for Mozilla Firefox...29 Create a new release for Mozilla Firefox...
3030
31Links to previous releases from the series are listed.31Links to previous releases from the series are listed.
3232
33 >>> other_releases = find_tag_by_id(browser.contents, 'other-releases')33 >>> other_releases = find_tag_by_id(browser.contents, 'other-releases')
34 >>> print extract_text(other_releases)34 >>> print(extract_text(other_releases))
35 The following releases have been made for the trunk series:35 The following releases have been made for the trunk series:
36 2004-10-16 Mozilla Firefox 0.9.2 (One (secure) Tree Hill)36 2004-10-16 Mozilla Firefox 0.9.2 (One (secure) Tree Hill)
37 2004-10-16 Mozilla Firefox 0.9.1 (One Tree Hill (v2))37 2004-10-16 Mozilla Firefox 0.9.1 (One Tree Hill (v2))
38 2004-10-16 Mozilla Firefox 0.9 (One Tree Hill)38 2004-10-16 Mozilla Firefox 0.9 (One Tree Hill)
3939
40 >>> print browser.getLink('0.9.1').url40 >>> print(browser.getLink('0.9.1').url)
41 http://launchpad.test/firefox/trunk/0.9.141 http://launchpad.test/firefox/trunk/0.9.1
4242
43Sample Person completes the release.43Sample Person completes the release.
@@ -54,9 +54,9 @@ After creating the release, Sample Person sees the release page.
5454
55The release's information is displayed in the page.55The release's information is displayed in the page.
5656
57 >>> print extract_text(find_tag_by_id(browser.contents, 'release-notes'))57 >>> print(extract_text(find_tag_by_id(browser.contents, 'release-notes')))
58 Released 1.058 Released 1.0
59 >>> print extract_text(find_tag_by_id(browser.contents, 'changelog'))59 >>> print(extract_text(find_tag_by_id(browser.contents, 'changelog')))
60 Fix Foo60 Fix Foo
6161
62Only one release can be created for each milestone.62Only one release can be created for each milestone.
@@ -106,12 +106,12 @@ The release owner can edit the release via its +edit form:
106106
107 >>> browser.open('http://launchpad.test/firefox/trunk/1.0')107 >>> browser.open('http://launchpad.test/firefox/trunk/1.0')
108 >>> browser.getLink('Change release details', index=1).click()108 >>> browser.getLink('Change release details', index=1).click()
109 >>> print browser.title109 >>> print(browser.title)
110 Edit Mozilla Firefox 1.0 release details...110 Edit Mozilla Firefox 1.0 release details...
111111
112 >>> browser.getControl('Changelog').value = 'This is not a joke.'112 >>> browser.getControl('Changelog').value = 'This is not a joke.'
113 >>> browser.getControl('Change').click()113 >>> browser.getControl('Change').click()
114 >>> print browser.title114 >>> print(browser.title)
115 1.0 : Series trunk : Mozilla Firefox115 1.0 : Series trunk : Mozilla Firefox
116116
117117
@@ -123,7 +123,7 @@ release too.
123 >>> from lp.registry.model.person import Person123 >>> from lp.registry.model.person import Person
124 >>> from lp.registry.model.product import Product124 >>> from lp.registry.model.product import Product
125 >>> tomcat = Product.selectOneBy(name='tomcat')125 >>> tomcat = Product.selectOneBy(name='tomcat')
126 >>> print tomcat.owner.name126 >>> print(tomcat.owner.name)
127 ubuntu-team127 ubuntu-team
128128
129Let's add a release as Jeff:129Let's add a release as Jeff:
@@ -137,7 +137,7 @@ Let's add a release as Jeff:
137 >>> browser.getControl('Date released').value = '2008-12-01'137 >>> browser.getControl('Date released').value = '2008-12-01'
138 >>> browser.getControl('Changelog').value = 'Fix Foo'138 >>> browser.getControl('Changelog').value = 'Fix Foo'
139 >>> browser.getControl('Create release').click()139 >>> browser.getControl('Create release').click()
140 >>> print browser.url140 >>> print(browser.url)
141 http://launchpad.test/tomcat/+milestone/0.6.6.6141 http://launchpad.test/tomcat/+milestone/0.6.6.6
142142
143Celso is a member of ubuntu-team, so he can edit this release too:143Celso is a member of ubuntu-team, so he can edit this release too:
@@ -145,12 +145,12 @@ Celso is a member of ubuntu-team, so he can edit this release too:
145 >>> browser = setupBrowser(auth='Basic celso.providelo@canonical.com:test')145 >>> browser = setupBrowser(auth='Basic celso.providelo@canonical.com:test')
146 >>> browser.open('http://launchpad.test/tomcat/trunk/0.6.6.6')146 >>> browser.open('http://launchpad.test/tomcat/trunk/0.6.6.6')
147 >>> browser.getLink('Change release details', index=0).click()147 >>> browser.getLink('Change release details', index=0).click()
148 >>> print browser.title148 >>> print(browser.title)
149 Edit Tomcat 0.6.6.6 release details...149 Edit Tomcat 0.6.6.6 release details...
150150
151 >>> browser.getControl('Changelog').value = 'Fixes 3 bugs.'151 >>> browser.getControl('Changelog').value = 'Fixes 3 bugs.'
152 >>> browser.getControl('Change').click()152 >>> browser.getControl('Change').click()
153 >>> print browser.title153 >>> print(browser.title)
154 0.6.6.6 : Series trunk : Tomcat154 0.6.6.6 : Series trunk : Tomcat
155155
156And if no-priv drives the series...156And if no-priv drives the series...
@@ -164,10 +164,10 @@ others:
164 >>> browser = setupBrowser(auth='Basic no-priv@canonical.com:test')164 >>> browser = setupBrowser(auth='Basic no-priv@canonical.com:test')
165 >>> browser.open('http://launchpad.test/tomcat/trunk/0.6.6.6')165 >>> browser.open('http://launchpad.test/tomcat/trunk/0.6.6.6')
166 >>> browser.getLink('Change release details', index=0).click()166 >>> browser.getLink('Change release details', index=0).click()
167 >>> print browser.title167 >>> print(browser.title)
168 Edit Tomcat 0.6.6.6 release details...168 Edit Tomcat 0.6.6.6 release details...
169169
170 >>> browser.getControl('Changelog').value = 'Fixes 4 bugs.'170 >>> browser.getControl('Changelog').value = 'Fixes 4 bugs.'
171 >>> browser.getControl('Change').click()171 >>> browser.getControl('Change').click()
172 >>> print browser.title172 >>> print(browser.title)
173 0.6.6.6 : Series trunk : Tomcat173 0.6.6.6 : Series trunk : Tomcat
diff --git a/lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt b/lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt
index 08aa581..31563f9 100644
--- a/lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt
+++ b/lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt
@@ -4,11 +4,11 @@ The main page of a product series includes a list of releases of that series.
4The 0.9.2 milestone has a release.4The 0.9.2 milestone has a release.
55
6 >>> user_browser.open('http://launchpad.test/firefox/trunk')6 >>> user_browser.open('http://launchpad.test/firefox/trunk')
7 >>> print user_browser.title7 >>> print(user_browser.title)
8 Series trunk : Mozilla Firefox8 Series trunk : Mozilla Firefox
99
10 >>> print extract_text(find_tag_by_id(10 >>> print(extract_text(find_tag_by_id(
11 ... user_browser.contents, 'series-trunk'))11 ... user_browser.contents, 'series-trunk')))
12 Version Expected Released Summary12 Version Expected Released Summary
13 Mozilla Firefox 0.9.2 ... None 2004-10-15 ...13 Mozilla Firefox 0.9.2 ... None 2004-10-15 ...
1414
@@ -17,7 +17,7 @@ access the delete page. A user without the necessary rights won't see the
17link and cannot access the +delete page.17link and cannot access the +delete page.
1818
19 >>> user_browser.getLink('0.9.2').click()19 >>> user_browser.getLink('0.9.2').click()
20 >>> print user_browser.title20 >>> print(user_browser.title)
21 0.9.2 "One (secure) Tree Hill" : Mozilla Firefox21 0.9.2 "One (secure) Tree Hill" : Mozilla Firefox
2222
23 >>> user_browser.getLink(url='/firefox/trunk/0.9.2/+delete')23 >>> user_browser.getLink(url='/firefox/trunk/0.9.2/+delete')
@@ -34,14 +34,14 @@ Salgado has the necessary rights, so he sees the link and the +delete page.
34 >>> salgados_browser = setupBrowser(auth='Basic salgado@ubuntu.com:test')34 >>> salgados_browser = setupBrowser(auth='Basic salgado@ubuntu.com:test')
35 >>> salgados_browser.open('http://launchpad.test/firefox/trunk/0.9.2')35 >>> salgados_browser.open('http://launchpad.test/firefox/trunk/0.9.2')
36 >>> salgados_browser.getLink('Delete release').click()36 >>> salgados_browser.getLink('Delete release').click()
37 >>> print salgados_browser.title37 >>> print(salgados_browser.title)
38 Delete Mozilla Firefox 0.9.2...38 Delete Mozilla Firefox 0.9.2...
3939
40The 0.9.2 release has some files associated with it. Salgado reads that40The 0.9.2 release has some files associated with it. Salgado reads that
41they will be deleted too.41they will be deleted too.
4242
43 >>> text = extract_text(find_main_content(salgados_browser.contents))43 >>> text = extract_text(find_main_content(salgados_browser.contents))
44 >>> print text.encode('ASCII', 'backslashreplace')44 >>> print(text.encode('ASCII', 'backslashreplace'))
45 Delete Mozilla Firefox 0.9.2 \u201cOne (secure) Tree Hill\u201d45 Delete Mozilla Firefox 0.9.2 \u201cOne (secure) Tree Hill\u201d
46 ...46 ...
47 Are you sure you want to delete the 0.9.2 release of47 Are you sure you want to delete the 0.9.2 release of
@@ -52,7 +52,7 @@ they will be deleted too.
52Salgado chooses the delete button, then reads that the action is successful.52Salgado chooses the delete button, then reads that the action is successful.
5353
54 >>> salgados_browser.getControl('Delete Release').click()54 >>> salgados_browser.getControl('Delete Release').click()
55 >>> print salgados_browser.title55 >>> print(salgados_browser.title)
56 Series trunk : Mozilla Firefox56 Series trunk : Mozilla Firefox
5757
58 >>> print_feedback_messages(salgados_browser.contents)58 >>> print_feedback_messages(salgados_browser.contents)
@@ -61,7 +61,7 @@ Salgado chooses the delete button, then reads that the action is successful.
61Milestone 0.9.2 no longer has a release. The release column explains that61Milestone 0.9.2 no longer has a release. The release column explains that
62the milestone is inactive.62the milestone is inactive.
6363
64 >>> print extract_text(64 >>> print(extract_text(
65 ... find_tag_by_id(salgados_browser.contents, 'series-trunk'))65 ... find_tag_by_id(salgados_browser.contents, 'series-trunk')))
66 Version Expected Released Summary66 Version Expected Released Summary
67 Mozilla Firefox 0.9.2... Set date Change details This is an inactive ...67 Mozilla Firefox 0.9.2... Set date Change details This is an inactive ...
diff --git a/lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt b/lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt
index 5eb96c5..a620ac3 100644
--- a/lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt
+++ b/lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt
@@ -1,8 +1,8 @@
1Check that the productrelease RDF export works.1Check that the productrelease RDF export works.
22
3 >>> print http(r"""3 >>> print(http(r"""
4 ... GET /firefox/trunk/0.9/+rdf HTTP/1.14 ... GET /firefox/trunk/0.9/+rdf HTTP/1.1
5 ... """)5 ... """))
6 HTTP/1.1 200 Ok6 HTTP/1.1 200 Ok
7 Content-Disposition: attachment; filename="firefox-trunk-0.9.rdf"7 Content-Disposition: attachment; filename="firefox-trunk-0.9.rdf"
8 Content-Length: ...8 Content-Length: ...
diff --git a/lib/lp/registry/stories/productrelease/xx-productrelease-view.txt b/lib/lp/registry/stories/productrelease/xx-productrelease-view.txt
index 8c41ffd..05f00e4 100644
--- a/lib/lp/registry/stories/productrelease/xx-productrelease-view.txt
+++ b/lib/lp/registry/stories/productrelease/xx-productrelease-view.txt
@@ -1,11 +1,11 @@
1Any user can see a release for a series.1Any user can see a release for a series.
22
3 >>> anon_browser.open('http://launchpad.test/firefox/trunk/0.9.2')3 >>> anon_browser.open('http://launchpad.test/firefox/trunk/0.9.2')
4 >>> print anon_browser.title4 >>> print(anon_browser.title)
5 0.9.2 "One (secure) Tree Hill" : Series trunk : Mozilla Firefox5 0.9.2 "One (secure) Tree Hill" : Series trunk : Mozilla Firefox
66
7 >>> content = find_main_content(anon_browser.contents)7 >>> content = find_main_content(anon_browser.contents)
8 >>> print extract_text(find_tag_by_id(content, 'Release-details'))8 >>> print(extract_text(find_tag_by_id(content, 'Release-details')))
9 Milestone information9 Milestone information
10 Project: Mozilla Firefox10 Project: Mozilla Firefox
11 Series: trunk11 Series: trunk
@@ -21,11 +21,11 @@ Any user can see a table describing the files that are associated with the
21release. Each file is linked.21release. Each file is linked.
2222
23 >>> table = find_tag_by_id(content, 'downloads')23 >>> table = find_tag_by_id(content, 'downloads')
24 >>> print extract_text(table)24 >>> print(extract_text(table))
25 File Description Downloads25 File Description Downloads
26 firefox_0.9.2.orig.tar.gz (md5) -26 firefox_0.9.2.orig.tar.gz (md5) -
2727
28 >>> print table.a28 >>> print(table.a)
29 <a href=".../firefox/trunk/0.9.2/+download/firefox_0.9.2.orig.tar.gz"29 <a href=".../firefox/trunk/0.9.2/+download/firefox_0.9.2.orig.tar.gz"
30 title="firefox_0.9.2.orig.tar.gz (9.5 MiB)">...30 title="firefox_0.9.2.orig.tar.gz (9.5 MiB)">...
3131
@@ -46,7 +46,7 @@ downloaded and the date of the last download on that table as well.
46 >>> lfa.updateDownloadCount(date(2006, 5, 4), None, 1)46 >>> lfa.updateDownloadCount(date(2006, 5, 4), None, 1)
4747
48 >>> anon_browser.reload()48 >>> anon_browser.reload()
49 >>> print extract_text(find_tag_by_id(anon_browser.contents, 'downloads'))49 >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'downloads')))
50 File Description Downloads50 File Description Downloads
51 firefox_0.9.2.orig.tar.gz (md5) 1 last downloaded ...51 firefox_0.9.2.orig.tar.gz (md5) 1 last downloaded ...
52 Total downloads: 152 Total downloads: 1
@@ -58,7 +58,7 @@ downloaded, so we can't say it was downloaded a few minutes/hours ago.
58 >>> import pytz58 >>> import pytz
59 >>> lfa.updateDownloadCount(datetime.now(pytz.utc).date(), None, 4356)59 >>> lfa.updateDownloadCount(datetime.now(pytz.utc).date(), None, 4356)
60 >>> anon_browser.reload()60 >>> anon_browser.reload()
61 >>> print extract_text(find_tag_by_id(anon_browser.contents, 'downloads'))61 >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'downloads')))
62 File Description Downloads62 File Description Downloads
63 firefox_0.9.2.orig.tar.gz (md5) 4,357 last downloaded today63 firefox_0.9.2.orig.tar.gz (md5) 4,357 last downloaded today
64 Total downloads: 4,35764 Total downloads: 4,357
diff --git a/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt b/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt
index c5c938f..64c43bc 100644
--- a/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt
+++ b/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt
@@ -23,10 +23,10 @@ But Sample Person will and be able to add a series.
23 >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')23 >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')
24 >>> browser.open('http://launchpad.test/firefox')24 >>> browser.open('http://launchpad.test/firefox')
25 >>> browser.getLink('Register a series').click()25 >>> browser.getLink('Register a series').click()
26 >>> print browser.url26 >>> print(browser.url)
27 http://launchpad.test/firefox/+addseries27 http://launchpad.test/firefox/+addseries
2828
29 >>> print find_main_content(browser.contents).find('h1').renderContents()29 >>> print(find_main_content(browser.contents).find('h1').renderContents())
30 Register a new Mozilla Firefox release series30 Register a new Mozilla Firefox release series
3131
32After checking that the page +addseries is there, we try to add a new series.32After checking that the page +addseries is there, we try to add a new series.
@@ -43,7 +43,7 @@ Now we are redirected to the Overview page of the product series we just added
43 >>> browser.url43 >>> browser.url
44 'http://launchpad.test/firefox/stable'44 'http://launchpad.test/firefox/stable'
4545
46 >>> print extract_text(find_tag_by_id(browser.contents, 'description'))46 >>> print(extract_text(find_tag_by_id(browser.contents, 'description')))
47 Product series add testing47 Product series add testing
4848
49 >>> browser.getLink('lp://dev/~mark/firefox/release-0.9.2')49 >>> browser.getLink('lp://dev/~mark/firefox/release-0.9.2')
@@ -76,7 +76,7 @@ name already in use and an invalud release URL pattern:
76We'll get a nice error message for the three problems:76We'll get a nice error message for the three problems:
7777
78 >>> for tag in find_tags_by_class(browser.contents, 'message'):78 >>> for tag in find_tags_by_class(browser.contents, 'message'):
79 ... print extract_text(tag)79 ... print(extract_text(tag))
80 There are 2 errors.80 There are 2 errors.
81 1.0 is already in use by another series.81 1.0 is already in use by another series.
82 Invalid release URL pattern.82 Invalid release URL pattern.
@@ -97,7 +97,7 @@ of firefox:
97The new values are then shown in the series' page.97The new values are then shown in the series' page.
9898
99 >>> content = find_tag_by_id(browser.contents, 'series-details')99 >>> content = find_tag_by_id(browser.contents, 'series-details')
100 >>> print extract_text(find_tag_by_id(content, 'series-name'))100 >>> print(extract_text(find_tag_by_id(content, 'series-name')))
101 Series: unstable101 Series: unstable
102102
103And if we try to add another series with the same name to same product, we103And if we try to add another series with the same name to same product, we
@@ -110,7 +110,7 @@ should get a nice error message.
110 >>> browser.getControl('Register Series').click()110 >>> browser.getControl('Register Series').click()
111111
112 >>> for message in find_tags_by_class(browser.contents, 'message'):112 >>> for message in find_tags_by_class(browser.contents, 'message'):
113 ... print message.renderContents()113 ... print(message.renderContents())
114 There is 1 error.114 There is 1 error.
115 unstable is already in use by another series.115 unstable is already in use by another series.
116116
@@ -123,7 +123,7 @@ we can create structural bug subscriptions.
123123
124 >>> browser.open('http://launchpad.test/firefox/unstable')124 >>> browser.open('http://launchpad.test/firefox/unstable')
125 >>> browser.getLink('Subscribe to bug mail').click()125 >>> browser.getLink('Subscribe to bug mail').click()
126 >>> print browser.url126 >>> print(browser.url)
127 http://launchpad.test/firefox/unstable/+subscribe127 http://launchpad.test/firefox/unstable/+subscribe
128 >>> print browser.title128 >>> print(browser.title)
129 Subscribe : Series unstable : Bugs : Mozilla Firefox129 Subscribe : Series unstable : Bugs : Mozilla Firefox
diff --git a/lib/lp/registry/stories/productseries/xx-productseries-delete.txt b/lib/lp/registry/stories/productseries/xx-productseries-delete.txt
index b551c96..b1c867d 100644
--- a/lib/lp/registry/stories/productseries/xx-productseries-delete.txt
+++ b/lib/lp/registry/stories/productseries/xx-productseries-delete.txt
@@ -8,19 +8,19 @@ is really happening in the 1.0 series.
88
9 >>> owner_browser = setupBrowser(auth='Basic test@canonical.com:test')9 >>> owner_browser = setupBrowser(auth='Basic test@canonical.com:test')
10 >>> owner_browser.open('http://launchpad.test/firefox/trunk')10 >>> owner_browser.open('http://launchpad.test/firefox/trunk')
11 >>> print owner_browser.title11 >>> print(owner_browser.title)
12 Series trunk : Mozilla Firefox12 Series trunk : Mozilla Firefox
1313
14 >>> owner_browser.getLink('Delete series').click()14 >>> owner_browser.getLink('Delete series').click()
15 >>> print owner_browser.title15 >>> print(owner_browser.title)
16 Delete Mozilla Firefox trunk series...16 Delete Mozilla Firefox trunk series...
1717
18The trunk series is the focus of development. It cannot be deleted.18The trunk series is the focus of development. It cannot be deleted.
19The owner learns that they must make another series the focus of development19The owner learns that they must make another series the focus of development
20first. There is no delete button on the page.20first. There is no delete button on the page.
2121
22 >>> print extract_text(22 >>> print(extract_text(
23 ... find_tag_by_id(owner_browser.contents, 'cannot-delete'))23 ... find_tag_by_id(owner_browser.contents, 'cannot-delete')))
24 You cannot delete a series that is the focus of development. Make24 You cannot delete a series that is the focus of development. Make
25 another series the focus of development before deleting this one.25 another series the focus of development before deleting this one.
26 You cannot delete a series that is linked to packages in distributions.26 You cannot delete a series that is linked to packages in distributions.
@@ -37,12 +37,12 @@ bogus.
3737
38 >>> owner_browser.getLink('Cancel').click()38 >>> owner_browser.getLink('Cancel').click()
39 >>> owner_browser.open('http://launchpad.test/firefox/+edit')39 >>> owner_browser.open('http://launchpad.test/firefox/+edit')
40 >>> print owner_browser.title40 >>> print(owner_browser.title)
41 Change Mozilla Firefox's details...41 Change Mozilla Firefox's details...
4242
43 >>> owner_browser.getControl('Development focus').value = ['2']43 >>> owner_browser.getControl('Development focus').value = ['2']
44 >>> owner_browser.getControl('Change').click()44 >>> owner_browser.getControl('Change').click()
45 >>> print owner_browser.title45 >>> print(owner_browser.title)
46 Mozilla Firefox in Launchpad46 Mozilla Firefox in Launchpad
4747
48 >>> owner_browser.getLink('All packages').click()48 >>> owner_browser.getLink('All packages').click()
@@ -57,35 +57,35 @@ deleted. The milestones and releases are linked.
5757
58 >>> owner_browser.getLink('trunk series').click()58 >>> owner_browser.getLink('trunk series').click()
59 >>> owner_browser.getLink('Delete series').click()59 >>> owner_browser.getLink('Delete series').click()
60 >>> print owner_browser.title60 >>> print(owner_browser.title)
61 Delete Mozilla Firefox trunk series...61 Delete Mozilla Firefox trunk series...
6262
63 >>> contents = find_main_content(owner_browser.contents)63 >>> contents = find_main_content(owner_browser.contents)
64 >>> print extract_text(find_tag_by_id(contents, 'milestones-and-files'))64 >>> print(extract_text(find_tag_by_id(contents, 'milestones-and-files')))
65 The associated milestones and releases65 The associated milestones and releases
66 and their files will be also be deleted:66 and their files will be also be deleted:
6767
68 >>> print extract_text(find_tag_by_id(contents, 'milestones'))68 >>> print(extract_text(find_tag_by_id(contents, 'milestones')))
69 0.9.2 "One (secure) Tree Hill"69 0.9.2 "One (secure) Tree Hill"
70 0.9.1 "One Tree Hill (v2)"70 0.9.1 "One Tree Hill (v2)"
71 0.9 "One Tree Hill"71 0.9 "One Tree Hill"
72 1.072 1.0
7373
74 >>> print owner_browser.getLink('0.9.2 "One (secure) Tree Hill"')74 >>> print(owner_browser.getLink('0.9.2 "One (secure) Tree Hill"'))
75 <Link text='0.9.2 "One (secure) Tree Hill"' ...>75 <Link text='0.9.2 "One (secure) Tree Hill"' ...>
7676
77 >>> print extract_text(find_tag_by_id(contents, 'files'))77 >>> print(extract_text(find_tag_by_id(contents, 'files')))
78 firefox_0.9.2.orig.tar.gz78 firefox_0.9.2.orig.tar.gz
7979
80 >>> print extract_text(80 >>> print(extract_text(
81 ... find_tag_by_id(contents, 'bugtasks-and-blueprints'))81 ... find_tag_by_id(contents, 'bugtasks-and-blueprints')))
82 Support E4X in EcmaScript82 Support E4X in EcmaScript
8383
84The owner deletes the series and the project page is displayed. They read84The owner deletes the series and the project page is displayed. They read
85that the series was deleted, and can not see a link to it anymore.85that the series was deleted, and can not see a link to it anymore.
8686
87 >>> owner_browser.getControl('Delete this Series').click()87 >>> owner_browser.getControl('Delete this Series').click()
88 >>> print owner_browser.title88 >>> print(owner_browser.title)
89 Mozilla Firefox in Launchpad89 Mozilla Firefox in Launchpad
9090
91 >>> print_feedback_messages(owner_browser.contents)91 >>> print_feedback_messages(owner_browser.contents)
@@ -101,10 +101,10 @@ release manager sees the explanation when they try to delete the series.
101101
102 >>> owner_browser.open('http://launchpad.test/evolution/trunk')102 >>> owner_browser.open('http://launchpad.test/evolution/trunk')
103 >>> owner_browser.getLink('Delete series').click()103 >>> owner_browser.getLink('Delete series').click()
104 >>> print owner_browser.title104 >>> print(owner_browser.title)
105 Delete Evolution trunk series ...105 Delete Evolution trunk series ...
106106
107 >>> print extract_text(107 >>> print(extract_text(
108 ... find_tag_by_id(owner_browser.contents, 'cannot-delete'))108 ... find_tag_by_id(owner_browser.contents, 'cannot-delete')))
109 You ...109 You ...
110 This series cannot be deleted because it has translations.110 This series cannot be deleted because it has translations.
diff --git a/lib/lp/registry/stories/productseries/xx-productseries-driver.txt b/lib/lp/registry/stories/productseries/xx-productseries-driver.txt
index bb36017..6910665 100644
--- a/lib/lp/registry/stories/productseries/xx-productseries-driver.txt
+++ b/lib/lp/registry/stories/productseries/xx-productseries-driver.txt
@@ -8,16 +8,16 @@ by appointing someone else as the driver.
8 >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')8 >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')
9 >>> browser.open('http://launchpad.test/firefox/1.0')9 >>> browser.open('http://launchpad.test/firefox/1.0')
10 >>> content = find_tag_by_id(browser.contents, 'series-details')10 >>> content = find_tag_by_id(browser.contents, 'series-details')
11 >>> print extract_text(find_tag_by_id(content, 'series-drivers'))11 >>> print(extract_text(find_tag_by_id(content, 'series-drivers')))
12 Project drivers: Sample Person12 Project drivers: Sample Person
13 >>> print extract_text(find_tag_by_id(content, 'series-release-manager'))13 >>> print(extract_text(find_tag_by_id(content, 'series-release-manager')))
14 Release manager: None Appoint release manager14 Release manager: None Appoint release manager
1515
16 >>> browser.getLink('Appoint release manager').click()16 >>> browser.getLink('Appoint release manager').click()
1717
18 >>> browser.url18 >>> browser.url
19 'http://launchpad.test/firefox/1.0/+driver'19 'http://launchpad.test/firefox/1.0/+driver'
20 >>> print browser.title20 >>> print(browser.title)
21 Appoint the release manager for...21 Appoint the release manager for...
22 >>> browser.getControl('Release manager').value22 >>> browser.getControl('Release manager').value
23 ''23 ''
@@ -38,8 +38,8 @@ message explains that the driver changed.
38Sample Person and Guilherme Salgado are listed as the drivers of Firefox 1.0.38Sample Person and Guilherme Salgado are listed as the drivers of Firefox 1.0.
3939
40 >>> content = find_tag_by_id(browser.contents, 'series-details')40 >>> content = find_tag_by_id(browser.contents, 'series-details')
41 >>> print extract_text(find_tag_by_id(content, 'series-drivers'))41 >>> print(extract_text(find_tag_by_id(content, 'series-drivers')))
42 Project drivers: Guilherme Salgado, Sample Person42 Project drivers: Guilherme Salgado, Sample Person
43 >>> print extract_text(find_tag_by_id(content, 'series-release-manager'))43 >>> print(extract_text(find_tag_by_id(content, 'series-release-manager')))
44 Release manager: Guilherme Salgado Appoint release manager44 Release manager: Guilherme Salgado Appoint release manager
4545
diff --git a/lib/lp/registry/stories/productseries/xx-productseries-index.txt b/lib/lp/registry/stories/productseries/xx-productseries-index.txt
index bbd88b8..7a4470c 100644
--- a/lib/lp/registry/stories/productseries/xx-productseries-index.txt
+++ b/lib/lp/registry/stories/productseries/xx-productseries-index.txt
@@ -4,14 +4,14 @@ Product Series Overview
4The product series overview page summarises the series.4The product series overview page summarises the series.
55
6 >>> anon_browser.open('http://launchpad.test/firefox/trunk')6 >>> anon_browser.open('http://launchpad.test/firefox/trunk')
7 >>> print extract_text(anon_browser.title)7 >>> print(extract_text(anon_browser.title))
8 Series trunk : Mozilla Firefox8 Series trunk : Mozilla Firefox
99
10 >>> content = find_main_content(anon_browser.contents)10 >>> content = find_main_content(anon_browser.contents)
11 >>> print extract_text(content.h1)11 >>> print(extract_text(content.h1))
12 Mozilla Firefox trunk series12 Mozilla Firefox trunk series
1313
14 >>> print extract_text(find_tag_by_id(content, 'series-details'))14 >>> print(extract_text(find_tag_by_id(content, 'series-details')))
15 Series information15 Series information
16 Project: Mozilla Firefox16 Project: Mozilla Firefox
17 Series: trunk17 Series: trunk
@@ -22,7 +22,7 @@ The product series overview page summarises the series.
22 Release URL pattern: None22 Release URL pattern: None
23 Download RDF metadata23 Download RDF metadata
2424
25 >>> print extract_text(find_tag_by_id(content, 'description'))25 >>> print(extract_text(find_tag_by_id(content, 'description')))
26 The "trunk" series represents the primary line of26 The "trunk" series represents the primary line of
27 development rather than a stable release branch. This is sometimes27 development rather than a stable release branch. This is sometimes
28 also called MAIN or HEAD.28 also called MAIN or HEAD.
@@ -52,7 +52,7 @@ The series page lists the milestones and releases for the series.
5252
53 >>> rows = find_tag_by_id(content, 'series-trunk').findAll('tr')53 >>> rows = find_tag_by_id(content, 'series-trunk').findAll('tr')
54 >>> for row in rows[0:2]:54 >>> for row in rows[0:2]:
55 ... print extract_text(row)55 ... print(extract_text(row))
56 Version Expected Released Summary56 Version Expected Released Summary
57 Mozilla Firefox 0.9.2 "One ... None 2004-10-15 This was a ...57 Mozilla Firefox 0.9.2 "One ... None 2004-10-15 This was a ...
5858
@@ -62,7 +62,7 @@ The driver can see a link to set the expected date.
62 >>> driver_rows = find_tag_by_id(62 >>> driver_rows = find_tag_by_id(
63 ... driver_content, 'series-trunk').findAll('tr')63 ... driver_content, 'series-trunk').findAll('tr')
64 >>> for row in driver_rows[0:2]:64 >>> for row in driver_rows[0:2]:
65 ... print extract_text(row)65 ... print(extract_text(row))
66 Version Expected Released Summary66 Version Expected Released Summary
67 Mozilla Firefox 0.9.2 "One ... Set date Chang... 2004-10-16 ...67 Mozilla Firefox 0.9.2 "One ... Set date Chang... 2004-10-16 ...
6868
@@ -72,13 +72,13 @@ The driver can see a link to set the expected date.
72The milestone summary column in the table may also contain a summary of72The milestone summary column in the table may also contain a summary of
73the status of the bugs and blueprints.73the status of the bugs and blueprints.
7474
75 >>> print extract_text(rows[-1])75 >>> print(extract_text(rows[-1]))
76 Mozilla Firefox 1.0 2056-10-16 not yet released76 Mozilla Firefox 1.0 2056-10-16 not yet released
77 Blueprints targeted: 1 Unknown77 Blueprints targeted: 1 Unknown
7878
79The driver can see a link to create a release for the milestone.79The driver can see a link to create a release for the milestone.
8080
81 >>> print extract_text(driver_rows[-1])81 >>> print(extract_text(driver_rows[-1]))
82 Mozilla Firefox 1.0 2056-10-16 Release now Blueprints targeted: ...82 Mozilla Firefox 1.0 2056-10-16 Release now Blueprints targeted: ...
8383
84 >>> driver_browser.getLink('Release now')84 >>> driver_browser.getLink('Release now')
@@ -96,13 +96,13 @@ The user can learn where the code of the series is located if a branch
96is set. Otherwise, there is a message explaining that the information has96is set. Otherwise, there is a message explaining that the information has
97not been set.97not been set.
9898
99 >>> print extract_text(find_tag_by_id(content, 'branch-details'))99 >>> print(extract_text(find_tag_by_id(content, 'branch-details')))
100 No revision control details recorded for Mozilla Firefox trunk series.100 No revision control details recorded for Mozilla Firefox trunk series.
101101
102The driver sees that they can link a branch to this series, and there is102The driver sees that they can link a branch to this series, and there is
103an explanation where they can push the branch.103an explanation where they can push the branch.
104104
105 >>> print extract_text(find_tag_by_id(driver_content, 'branch-details'))105 >>> print(extract_text(find_tag_by_id(driver_content, 'branch-details')))
106 You haven't yet told Launchpad where your source code is ...106 You haven't yet told Launchpad where your source code is ...
107 bzr push lp:~name12/firefox/trunk ...107 bzr push lp:~name12/firefox/trunk ...
108108
@@ -112,11 +112,11 @@ an explanation where they can push the branch.
112Distribution packaging is listed too. There is a link to the source package112Distribution packaging is listed too. There is a link to the source package
113in each Ubuntu series.113in each Ubuntu series.
114114
115 >>> print extract_text(find_tag_by_id(115 >>> print(extract_text(find_tag_by_id(
116 ... content, 'distribution-packaging-explanation'))116 ... content, 'distribution-packaging-explanation')))
117 This series is packaged in the following distribution series:117 This series is packaged in the following distribution series:
118118
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: