Merge ~cjwatson/launchpad:registry-pagetests-future-imports into launchpad:master
- Git
- lp:~cjwatson/launchpad
- registry-pagetests-future-imports
- Merge into 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) |
Related bugs: |
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/
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/lib/lp/registry/stories/announcements/xx-announcements.txt b/lib/lp/registry/stories/announcements/xx-announcements.txt | |||
2 | index e0ffc0b..9a12076 100644 | |||
3 | --- a/lib/lp/registry/stories/announcements/xx-announcements.txt | |||
4 | +++ b/lib/lp/registry/stories/announcements/xx-announcements.txt | |||
5 | @@ -83,22 +83,22 @@ pillar. | |||
6 | 83 | >>> priv_browser = setupBrowser(auth="Basic mark@example.com:test") | 83 | >>> priv_browser = setupBrowser(auth="Basic mark@example.com:test") |
7 | 84 | >>> priv_browser.open('http://launchpad.test/ubuntu') | 84 | >>> priv_browser.open('http://launchpad.test/ubuntu') |
8 | 85 | >>> link = priv_browser.getLink('Make announcement') | 85 | >>> link = priv_browser.getLink('Make announcement') |
10 | 86 | >>> print link.text | 86 | >>> print(link.text) |
11 | 87 | Make announcement | 87 | Make announcement |
12 | 88 | 88 | ||
13 | 89 | >>> priv_browser.getLink('Read all announcements').click() | 89 | >>> priv_browser.getLink('Read all announcements').click() |
14 | 90 | >>> link = priv_browser.getLink('Make announcement') | 90 | >>> link = priv_browser.getLink('Make announcement') |
16 | 91 | >>> print link.text | 91 | >>> print(link.text) |
17 | 92 | Make announcement | 92 | Make announcement |
18 | 93 | 93 | ||
19 | 94 | >>> priv_browser.open('http://launchpad.test/firefox') | 94 | >>> priv_browser.open('http://launchpad.test/firefox') |
20 | 95 | >>> link = priv_browser.getLink('Make announcement') | 95 | >>> link = priv_browser.getLink('Make announcement') |
22 | 96 | >>> print link.text | 96 | >>> print(link.text) |
23 | 97 | Make announcement | 97 | Make announcement |
24 | 98 | 98 | ||
25 | 99 | >>> priv_browser.getLink('Read all announcements').click() | 99 | >>> priv_browser.getLink('Read all announcements').click() |
26 | 100 | >>> link = priv_browser.getLink('Make announcement') | 100 | >>> link = priv_browser.getLink('Make announcement') |
28 | 101 | >>> print link.text | 101 | >>> print(link.text) |
29 | 102 | Make announcement | 102 | Make announcement |
30 | 103 | 103 | ||
31 | 104 | 104 | ||
32 | @@ -118,9 +118,9 @@ announcement: | |||
33 | 118 | Making the announcement takes the user back to the main page for the | 118 | Making the announcement takes the user back to the main page for the |
34 | 119 | project. | 119 | project. |
35 | 120 | 120 | ||
37 | 121 | >>> print priv_browser.url | 121 | >>> print(priv_browser.url) |
38 | 122 | http://launchpad.test/apache | 122 | http://launchpad.test/apache |
40 | 123 | >>> print priv_browser.title | 123 | >>> print(priv_browser.title) |
41 | 124 | Apache in Launchpad | 124 | Apache in Launchpad |
42 | 125 | 125 | ||
43 | 126 | We'll repeat the process for Tomcat, an IProduct that is part of the | 126 | We'll repeat the process for Tomcat, an IProduct that is part of the |
44 | @@ -134,8 +134,8 @@ announcement so there is a "Latest news" portlet. Let's render the | |||
45 | 134 | portlet, taking care not to render today's date which would timebomb our | 134 | portlet, taking care not to render today's date which would timebomb our |
46 | 135 | script. | 135 | script. |
47 | 136 | 136 | ||
50 | 137 | >>> print latest_news(priv_browser.contents).encode( | 137 | >>> print(latest_news(priv_browser.contents).encode( |
51 | 138 | ... 'ascii', 'backslashreplace') | 138 | ... 'ascii', 'backslashreplace')) |
52 | 139 | Announcements | 139 | Announcements |
53 | 140 | Apache announcement headline... | 140 | Apache announcement headline... |
54 | 141 | Read all announcements | 141 | Read all announcements |
55 | @@ -154,13 +154,13 @@ work too: | |||
56 | 154 | ... name='field.publication_date.announcement_date').value = ( | 154 | ... name='field.publication_date.announcement_date').value = ( |
57 | 155 | ... '2007-11-24 09:00:00') | 155 | ... '2007-11-24 09:00:00') |
58 | 156 | >>> priv_browser.getControl('Make announcement').click() | 156 | >>> priv_browser.getControl('Make announcement').click() |
60 | 157 | >>> print priv_browser.title | 157 | >>> print(priv_browser.title) |
61 | 158 | Tomcat in Launchpad | 158 | Tomcat in Launchpad |
62 | 159 | 159 | ||
63 | 160 | And check out the results: | 160 | And check out the results: |
64 | 161 | 161 | ||
67 | 162 | >>> print latest_news(priv_browser.contents).encode( | 162 | >>> print(latest_news(priv_browser.contents).encode( |
68 | 163 | ... 'ascii', 'backslashreplace') | 163 | ... 'ascii', 'backslashreplace')) |
69 | 164 | Announcements | 164 | Announcements |
70 | 165 | Apache announcement headline ... | 165 | Apache announcement headline ... |
71 | 166 | Tomcat announcement headline on 2007-11-24 ... | 166 | Tomcat announcement headline on 2007-11-24 ... |
72 | @@ -169,7 +169,7 @@ And check out the results: | |||
73 | 169 | 169 | ||
74 | 170 | Let's make sure that the announcement is presented as a link. | 170 | Let's make sure that the announcement is presented as a link. |
75 | 171 | 171 | ||
77 | 172 | >>> print priv_browser.getLink('Tomcat announcement headline').url | 172 | >>> print(priv_browser.getLink('Tomcat announcement headline').url) |
78 | 173 | http://launchpad.test/tomcat/+announcement/... | 173 | http://launchpad.test/tomcat/+announcement/... |
79 | 174 | 174 | ||
80 | 175 | We'll repeat the process for Derby, an IProduct that is part of the | 175 | We'll repeat the process for Derby, an IProduct that is part of the |
81 | @@ -185,7 +185,7 @@ announcement immediately: | |||
82 | 185 | >>> priv_browser.getControl('Summary').value = ( | 185 | >>> priv_browser.getControl('Summary').value = ( |
83 | 186 | ... 'Derby announcement summary') | 186 | ... 'Derby announcement summary') |
84 | 187 | >>> priv_browser.getControl('Make announcement').click() | 187 | >>> priv_browser.getControl('Make announcement').click() |
86 | 188 | >>> print priv_browser.title | 188 | >>> print(priv_browser.title) |
87 | 189 | Derby in Launchpad | 189 | Derby in Launchpad |
88 | 190 | >>> 'Derby announcement' in latest_news(priv_browser.contents) | 190 | >>> 'Derby announcement' in latest_news(priv_browser.contents) |
89 | 191 | True | 191 | True |
90 | @@ -205,7 +205,7 @@ date in the future when the announcement will be made: | |||
91 | 205 | ... name='field.publication_date.announcement_date').value = ( | 205 | ... name='field.publication_date.announcement_date').value = ( |
92 | 206 | ... '2021-12-24 09:00:00') | 206 | ... '2021-12-24 09:00:00') |
93 | 207 | >>> priv_browser.getControl('Make announcement').click() | 207 | >>> priv_browser.getControl('Make announcement').click() |
95 | 208 | >>> print priv_browser.title | 208 | >>> print(priv_browser.title) |
96 | 209 | Jokosher in Launchpad | 209 | Jokosher in Launchpad |
97 | 210 | >>> 'Jokosher announcement' in latest_news(priv_browser.contents) | 210 | >>> 'Jokosher announcement' in latest_news(priv_browser.contents) |
98 | 211 | True | 211 | True |
99 | @@ -221,7 +221,7 @@ a date for the announcement at all: | |||
100 | 221 | ... 'Kubuntu announcement summary') | 221 | ... 'Kubuntu announcement summary') |
101 | 222 | >>> priv_browser.getControl('some time in the future').click() | 222 | >>> priv_browser.getControl('some time in the future').click() |
102 | 223 | >>> priv_browser.getControl('Make announcement').click() | 223 | >>> priv_browser.getControl('Make announcement').click() |
104 | 224 | >>> print priv_browser.title | 224 | >>> print(priv_browser.title) |
105 | 225 | Kubuntu in Launchpad | 225 | Kubuntu in Launchpad |
106 | 226 | >>> "Kubuntu announcement" in latest_news(priv_browser.contents) | 226 | >>> "Kubuntu announcement" in latest_news(priv_browser.contents) |
107 | 227 | True | 227 | True |
108 | @@ -235,7 +235,7 @@ And finally for RedHat, an IDistribution, with immediate announcement: | |||
109 | 235 | >>> priv_browser.getControl('Summary').value = ( | 235 | >>> priv_browser.getControl('Summary').value = ( |
110 | 236 | ... 'RedHat announcement summary') | 236 | ... 'RedHat announcement summary') |
111 | 237 | >>> priv_browser.getControl('Make announcement').click() | 237 | >>> priv_browser.getControl('Make announcement').click() |
113 | 238 | >>> print priv_browser.title | 238 | >>> print(priv_browser.title) |
114 | 239 | Red Hat in Launchpad | 239 | Red Hat in Launchpad |
115 | 240 | >>> "RedHat announcement" in latest_news(priv_browser.contents) | 240 | >>> "RedHat announcement" in latest_news(priv_browser.contents) |
116 | 241 | True | 241 | True |
117 | @@ -264,21 +264,21 @@ published: | |||
118 | 264 | 264 | ||
119 | 265 | >>> anon_browser.open('http://launchpad.test/apache/+announcements') | 265 | >>> anon_browser.open('http://launchpad.test/apache/+announcements') |
120 | 266 | >>> anon_browser.getLink('Derby announcement headline').click() | 266 | >>> anon_browser.getLink('Derby announcement headline').click() |
122 | 267 | >>> print anon_browser.title | 267 | >>> print(anon_browser.title) |
123 | 268 | Derby announcement headline : Derby | 268 | Derby announcement headline : Derby |
124 | 269 | 269 | ||
125 | 270 | The page shows the announcement and it has a link back to the announcements | 270 | The page shows the announcement and it has a link back to the announcements |
126 | 271 | page that any user can navigate. | 271 | page that any user can navigate. |
127 | 272 | 272 | ||
128 | 273 | >>> content = find_main_content(anon_browser.contents) | 273 | >>> content = find_main_content(anon_browser.contents) |
130 | 274 | >>> print extract_text(content.h1) | 274 | >>> print(extract_text(content.h1)) |
131 | 275 | Derby announcement headline | 275 | Derby announcement headline |
132 | 276 | 276 | ||
134 | 277 | >>> print extract_text(content.findAll('p')[1]) | 277 | >>> print(extract_text(content.findAll('p')[1])) |
135 | 278 | Derby announcement summary | 278 | Derby announcement summary |
136 | 279 | 279 | ||
137 | 280 | >>> anon_browser.getLink("Read all announcements").click() | 280 | >>> anon_browser.getLink("Read all announcements").click() |
139 | 281 | >>> print anon_browser.title | 281 | >>> print(anon_browser.title) |
140 | 282 | News and announcements... | 282 | News and announcements... |
141 | 283 | 283 | ||
142 | 284 | 284 | ||
143 | @@ -366,9 +366,9 @@ We can publish this announcement immediately. | |||
144 | 366 | 366 | ||
145 | 367 | >>> priv_browser.getLink('Kubuntu announcement headline').click() | 367 | >>> priv_browser.getLink('Kubuntu announcement headline').click() |
146 | 368 | >>> priv_browser.getLink('Publish announcement').click() | 368 | >>> priv_browser.getLink('Publish announcement').click() |
148 | 369 | >>> print priv_browser.title | 369 | >>> print(priv_browser.title) |
149 | 370 | Publish announcement : Kubuntu announcement headline : Kubuntu | 370 | Publish announcement : Kubuntu announcement headline : Kubuntu |
151 | 371 | >>> print priv_browser.url | 371 | >>> print(priv_browser.url) |
152 | 372 | http://launchpad.test/kubuntu/+announceme.../+publish | 372 | http://launchpad.test/kubuntu/+announceme.../+publish |
153 | 373 | >>> radio = priv_browser.getControl(name="field.publication_date.action") | 373 | >>> radio = priv_browser.getControl(name="field.publication_date.action") |
154 | 374 | >>> radio.value = ['immediately'] | 374 | >>> radio.value = ['immediately'] |
155 | @@ -376,7 +376,7 @@ We can publish this announcement immediately. | |||
156 | 376 | 376 | ||
157 | 377 | Doing so takes us back to the list of announcements. | 377 | Doing so takes us back to the list of announcements. |
158 | 378 | 378 | ||
160 | 379 | >>> print priv_browser.title | 379 | >>> print(priv_browser.title) |
161 | 380 | News and announcements... | 380 | News and announcements... |
162 | 381 | 381 | ||
163 | 382 | And since the announcement has been made, the everybody can now see | 382 | And since the announcement has been made, the everybody can now see |
164 | @@ -464,7 +464,7 @@ hosted in Launchpad: | |||
165 | 464 | The announcements are batched so only the latest four are shown, | 464 | The announcements are batched so only the latest four are shown, |
166 | 465 | leaving Tomcat out: | 465 | leaving Tomcat out: |
167 | 466 | 466 | ||
169 | 467 | >>> print extract_text(anon_browser.contents) | 467 | >>> print(extract_text(anon_browser.contents)) |
170 | 468 | Announcements from all projects hosted in Launchpad | 468 | Announcements from all projects hosted in Launchpad |
171 | 469 | ... | 469 | ... |
172 | 470 | 1...4 of 25 results | 470 | 1...4 of 25 results |
173 | @@ -486,34 +486,34 @@ The announcement listing page does not have editing links. They are | |||
174 | 486 | available on the individual announcement pages. | 486 | available on the individual announcement pages. |
175 | 487 | 487 | ||
176 | 488 | >>> priv_browser.open('http://launchpad.test/tomcat/+announcements') | 488 | >>> priv_browser.open('http://launchpad.test/tomcat/+announcements') |
178 | 489 | >>> print priv_browser.getLink('Read more').url | 489 | >>> print(priv_browser.getLink('Read more').url) |
179 | 490 | http://apache.org/announcement/rocking/ | 490 | http://apache.org/announcement/rocking/ |
180 | 491 | >>> priv_browser.getLink('Apache announcement headline').click() | 491 | >>> priv_browser.getLink('Apache announcement headline').click() |
181 | 492 | >>> priv_browser.getLink('Modify announcement').click() | 492 | >>> priv_browser.getLink('Modify announcement').click() |
183 | 493 | >>> print priv_browser.title | 493 | >>> print(priv_browser.title) |
184 | 494 | Modify announcement : Apache announcement headline : Apache | 494 | Modify announcement : Apache announcement headline : Apache |
185 | 495 | >>> headline = priv_browser.getControl('Headline') | 495 | >>> headline = priv_browser.getControl('Headline') |
187 | 496 | >>> print headline.value | 496 | >>> print(headline.value) |
188 | 497 | Apache announcement headline | 497 | Apache announcement headline |
189 | 498 | >>> headline.value = 'Modified headline' | 498 | >>> headline.value = 'Modified headline' |
190 | 499 | >>> summary = priv_browser.getControl('Summary') | 499 | >>> summary = priv_browser.getControl('Summary') |
192 | 500 | >>> print summary.value | 500 | >>> print(summary.value) |
193 | 501 | Apache announcement summary | 501 | Apache announcement summary |
194 | 502 | >>> summary.value = 'Modified summary' | 502 | >>> summary.value = 'Modified summary' |
195 | 503 | >>> url = priv_browser.getControl('URL') | 503 | >>> url = priv_browser.getControl('URL') |
197 | 504 | >>> print url.value | 504 | >>> print(url.value) |
198 | 505 | http://apache.org/announcement/rocking/ | 505 | http://apache.org/announcement/rocking/ |
199 | 506 | >>> url.value = ( | 506 | >>> url.value = ( |
200 | 507 | ... 'http://apache.org/modified/url/') | 507 | ... 'http://apache.org/modified/url/') |
201 | 508 | >>> priv_browser.getControl('Modify').click() | 508 | >>> priv_browser.getControl('Modify').click() |
203 | 509 | >>> print priv_browser.title | 509 | >>> print(priv_browser.title) |
204 | 510 | News and announcements... | 510 | News and announcements... |
205 | 511 | >>> priv_browser.open('http://launchpad.test/tomcat/+announcements') | 511 | >>> priv_browser.open('http://launchpad.test/tomcat/+announcements') |
206 | 512 | >>> 'Modified headline' in announcements(priv_browser.contents) | 512 | >>> 'Modified headline' in announcements(priv_browser.contents) |
207 | 513 | True | 513 | True |
208 | 514 | >>> 'Modified summary' in announcements(priv_browser.contents) | 514 | >>> 'Modified summary' in announcements(priv_browser.contents) |
209 | 515 | True | 515 | True |
211 | 516 | >>> print priv_browser.getLink('Read more').url | 516 | >>> print(priv_browser.getLink('Read more').url) |
212 | 517 | http://apache.org/modified/url/ | 517 | http://apache.org/modified/url/ |
213 | 518 | 518 | ||
214 | 519 | 519 | ||
215 | @@ -530,14 +530,14 @@ You can retract an announcement which was previously announced. | |||
216 | 530 | >>> priv_browser.getLink('Kubuntu announcement headline').click() | 530 | >>> priv_browser.getLink('Kubuntu announcement headline').click() |
217 | 531 | >>> priv_browser.getLink('Delete announcement').click() | 531 | >>> priv_browser.getLink('Delete announcement').click() |
218 | 532 | >>> priv_browser.getLink('retracting the announcement').click() | 532 | >>> priv_browser.getLink('retracting the announcement').click() |
220 | 533 | >>> print priv_browser.title | 533 | >>> print(priv_browser.title) |
221 | 534 | Retract announcement : Kubuntu announcement headline : Kubuntu | 534 | Retract announcement : Kubuntu announcement headline : Kubuntu |
222 | 535 | 535 | ||
223 | 536 | Actually clicking "Retract" takes us back to the listing page. The item | 536 | Actually clicking "Retract" takes us back to the listing page. The item |
224 | 537 | is shown as having been retracted if you are a privileged user. | 537 | is shown as having been retracted if you are a privileged user. |
225 | 538 | 538 | ||
226 | 539 | >>> priv_browser.getControl('Retract').click() | 539 | >>> priv_browser.getControl('Retract').click() |
228 | 540 | >>> print priv_browser.title | 540 | >>> print(priv_browser.title) |
229 | 541 | News and announcements... | 541 | News and announcements... |
230 | 542 | >>> 'Kubuntu announcement ' in announcements(priv_browser.contents) | 542 | >>> 'Kubuntu announcement ' in announcements(priv_browser.contents) |
231 | 543 | True | 543 | True |
232 | @@ -562,14 +562,14 @@ Once something has been retracted, it can be published again. | |||
233 | 562 | 562 | ||
234 | 563 | >>> priv_browser.getLink('Kubuntu announcement headline').click() | 563 | >>> priv_browser.getLink('Kubuntu announcement headline').click() |
235 | 564 | >>> priv_browser.getLink('Publish announcement').click() | 564 | >>> priv_browser.getLink('Publish announcement').click() |
237 | 565 | >>> print priv_browser.title | 565 | >>> print(priv_browser.title) |
238 | 566 | Publish announcement : Kubuntu announcement headline : Kubuntu | 566 | Publish announcement : Kubuntu announcement headline : Kubuntu |
239 | 567 | >>> radio = priv_browser.getControl(name="field.publication_date.action") | 567 | >>> radio = priv_browser.getControl(name="field.publication_date.action") |
240 | 568 | >>> radio.value = ['immediately'] | 568 | >>> radio.value = ['immediately'] |
241 | 569 | >>> priv_browser.getControl( | 569 | >>> priv_browser.getControl( |
242 | 570 | ... name="field.publication_date.announcement_date").value = '' | 570 | ... name="field.publication_date.announcement_date").value = '' |
243 | 571 | >>> priv_browser.getControl('Publish').click() | 571 | >>> priv_browser.getControl('Publish').click() |
245 | 572 | >>> print priv_browser.title | 572 | >>> print(priv_browser.title) |
246 | 573 | News and announcements... | 573 | News and announcements... |
247 | 574 | 574 | ||
248 | 575 | And once again it is visible to unprivileged users: | 575 | And once again it is visible to unprivileged users: |
249 | @@ -591,11 +591,11 @@ it. | |||
250 | 591 | >>> priv_browser.open('http://launchpad.test/kubuntu/+announcements') | 591 | >>> priv_browser.open('http://launchpad.test/kubuntu/+announcements') |
251 | 592 | >>> priv_browser.getLink('Kubuntu announcement headline').click() | 592 | >>> priv_browser.getLink('Kubuntu announcement headline').click() |
252 | 593 | >>> priv_browser.getLink('Move announcement').click() | 593 | >>> priv_browser.getLink('Move announcement').click() |
254 | 594 | >>> print priv_browser.title | 594 | >>> print(priv_browser.title) |
255 | 595 | Move announcement : Kubuntu announcement headline : Kubuntu | 595 | Move announcement : Kubuntu announcement headline : Kubuntu |
256 | 596 | >>> priv_browser.getControl('For').value = 'guadalinex' | 596 | >>> priv_browser.getControl('For').value = 'guadalinex' |
257 | 597 | >>> priv_browser.getControl('Retarget').click() | 597 | >>> priv_browser.getControl('Retarget').click() |
259 | 598 | >>> print priv_browser.title | 598 | >>> print(priv_browser.title) |
260 | 599 | News and announcements... | 599 | News and announcements... |
261 | 600 | >>> 'Kubuntu announcement' in announcements(priv_browser.contents) | 600 | >>> 'Kubuntu announcement' in announcements(priv_browser.contents) |
262 | 601 | True | 601 | True |
263 | @@ -608,14 +608,14 @@ not be able to move it. | |||
264 | 608 | >>> kamion_browser.open('http://launchpad.test/guadalinex/+announcements') | 608 | >>> kamion_browser.open('http://launchpad.test/guadalinex/+announcements') |
265 | 609 | >>> kamion_browser.getLink('Kubuntu announcement headline').click() | 609 | >>> kamion_browser.getLink('Kubuntu announcement headline').click() |
266 | 610 | >>> kamion_browser.getLink('Move announcement').click() | 610 | >>> kamion_browser.getLink('Move announcement').click() |
268 | 611 | >>> print kamion_browser.title | 611 | >>> print(kamion_browser.title) |
269 | 612 | Move announcement : Kubuntu announcement headline : GuadaLinex | 612 | Move announcement : Kubuntu announcement headline : GuadaLinex |
270 | 613 | >>> kamion_browser.getControl('For').value = 'kubuntu' | 613 | >>> kamion_browser.getControl('For').value = 'kubuntu' |
271 | 614 | >>> kamion_browser.getControl('Retarget').click() | 614 | >>> kamion_browser.getControl('Retarget').click() |
272 | 615 | >>> "don't have permission" in extract_text( | 615 | >>> "don't have permission" in extract_text( |
273 | 616 | ... find_main_content(kamion_browser.contents)) | 616 | ... find_main_content(kamion_browser.contents)) |
274 | 617 | True | 617 | True |
276 | 618 | >>> print kamion_browser.title | 618 | >>> print(kamion_browser.title) |
277 | 619 | Move announcement : Kubuntu announcement headline : GuadaLinex | 619 | Move announcement : Kubuntu announcement headline : GuadaLinex |
278 | 620 | 620 | ||
279 | 621 | 621 | ||
280 | @@ -642,11 +642,11 @@ domain. | |||
281 | 642 | >>> strainer = SoupStrainer('link', rel='self') | 642 | >>> strainer = SoupStrainer('link', rel='self') |
282 | 643 | >>> links = parse_links(nopriv_browser.contents, rel='self') | 643 | >>> links = parse_links(nopriv_browser.contents, rel='self') |
283 | 644 | >>> for link in links: | 644 | >>> for link in links: |
285 | 645 | ... print link | 645 | ... print(link) |
286 | 646 | <link href="http://feeds.launchpad.test/netapplet/announcements.atom" rel="self"/> | 646 | <link href="http://feeds.launchpad.test/netapplet/announcements.atom" rel="self"/> |
287 | 647 | 647 | ||
288 | 648 | >>> for id_ in parse_ids(nopriv_browser.contents): | 648 | >>> for id_ in parse_ids(nopriv_browser.contents): |
290 | 649 | ... print extract_text(id_) | 649 | ... print(extract_text(id_)) |
291 | 650 | tag:launchpad.net,2005-03-10:/netapplet/+announcements | 650 | tag:launchpad.net,2005-03-10:/netapplet/+announcements |
292 | 651 | 651 | ||
293 | 652 | The feeds include only published announcements. The Jokosher | 652 | The feeds include only published announcements. The Jokosher |
294 | @@ -672,7 +672,7 @@ Retracted items do not show up either. | |||
295 | 672 | >>> 'Kubuntu announcement headline' in nopriv_browser.contents | 672 | >>> 'Kubuntu announcement headline' in nopriv_browser.contents |
296 | 673 | True | 673 | True |
297 | 674 | >>> for id_ in parse_ids(nopriv_browser.contents): | 674 | >>> for id_ in parse_ids(nopriv_browser.contents): |
299 | 675 | ... print extract_text(id_) | 675 | ... print(extract_text(id_)) |
300 | 676 | tag:launchpad.net,2006-10-16:/guadalinex/+announcements | 676 | tag:launchpad.net,2006-10-16:/guadalinex/+announcements |
301 | 677 | tag:launchpad.net,...:/+announcement/... | 677 | tag:launchpad.net,...:/+announcement/... |
302 | 678 | 678 | ||
303 | @@ -683,7 +683,7 @@ Retracted items do not show up either. | |||
304 | 683 | >>> priv_browser.getLink('Kubuntu announcement headline').click() | 683 | >>> priv_browser.getLink('Kubuntu announcement headline').click() |
305 | 684 | >>> priv_browser.getLink('Delete announcement').click() | 684 | >>> priv_browser.getLink('Delete announcement').click() |
306 | 685 | >>> priv_browser.getLink('retracting the announcement').click() | 685 | >>> priv_browser.getLink('retracting the announcement').click() |
308 | 686 | >>> print priv_browser.title | 686 | >>> print(priv_browser.title) |
309 | 687 | Retract announcement : Kubuntu announcement headline : GuadaLinex | 687 | Retract announcement : Kubuntu announcement headline : GuadaLinex |
310 | 688 | >>> priv_browser.getControl('Retract').click() | 688 | >>> priv_browser.getControl('Retract').click() |
311 | 689 | >>> nopriv_browser.reload() | 689 | >>> nopriv_browser.reload() |
312 | @@ -706,7 +706,7 @@ products. | |||
313 | 706 | >>> 'Derby announcement headline' in nopriv_browser.contents | 706 | >>> 'Derby announcement headline' in nopriv_browser.contents |
314 | 707 | True | 707 | True |
315 | 708 | >>> for id_ in parse_ids(nopriv_browser.contents): | 708 | >>> for id_ in parse_ids(nopriv_browser.contents): |
317 | 709 | ... print extract_text(id_) | 709 | ... print(extract_text(id_)) |
318 | 710 | tag:launchpad.net,2004-09-24:/apache/+announcements | 710 | tag:launchpad.net,2004-09-24:/apache/+announcements |
319 | 711 | tag:launchpad.net,...:/+announcement/... | 711 | tag:launchpad.net,...:/+announcement/... |
320 | 712 | tag:launchpad.net,...:/+announcement/... | 712 | tag:launchpad.net,...:/+announcement/... |
321 | @@ -715,7 +715,7 @@ products. | |||
322 | 715 | >>> strainer = SoupStrainer('link', rel='self') | 715 | >>> strainer = SoupStrainer('link', rel='self') |
323 | 716 | >>> links = parse_links(nopriv_browser.contents, rel='self') | 716 | >>> links = parse_links(nopriv_browser.contents, rel='self') |
324 | 717 | >>> for link in links: | 717 | >>> for link in links: |
326 | 718 | ... print link | 718 | ... print(link) |
327 | 719 | <link href="http://feeds.launchpad.test/apache/announcements.atom" rel="self"/> | 719 | <link href="http://feeds.launchpad.test/apache/announcements.atom" rel="self"/> |
328 | 720 | 720 | ||
329 | 721 | Finally, there is a feed for all announcements across all projects | 721 | Finally, there is a feed for all announcements across all projects |
330 | @@ -781,10 +781,10 @@ An owner can permanently delete an announcement. | |||
331 | 781 | False | 781 | False |
332 | 782 | >>> kamion_browser.getLink('Kubuntu announcement headline').click() | 782 | >>> kamion_browser.getLink('Kubuntu announcement headline').click() |
333 | 783 | >>> kamion_browser.getLink('Delete announcement').click() | 783 | >>> kamion_browser.getLink('Delete announcement').click() |
335 | 784 | >>> print kamion_browser.title | 784 | >>> print(kamion_browser.title) |
336 | 785 | Delete announcement : Kubuntu announcement headline : GuadaLinex | 785 | Delete announcement : Kubuntu announcement headline : GuadaLinex |
337 | 786 | >>> kamion_browser.getControl('Delete').click() | 786 | >>> kamion_browser.getControl('Delete').click() |
339 | 787 | >>> print priv_browser.title | 787 | >>> print(priv_browser.title) |
340 | 788 | News and announcements... | 788 | News and announcements... |
341 | 789 | >>> no_announcements(kamion_browser.contents) | 789 | >>> no_announcements(kamion_browser.contents) |
342 | 790 | True | 790 | True |
343 | diff --git a/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt b/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt | |||
344 | index 07a4613..f8dc2c9 100644 | |||
345 | --- a/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt | |||
346 | +++ b/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt | |||
347 | @@ -33,23 +33,23 @@ The distribution's registrant can access the page and change the usage. | |||
348 | 33 | >>> registrant = setupBrowser( | 33 | >>> registrant = setupBrowser( |
349 | 34 | ... auth='Basic celso.providelo@canonical.com:test') | 34 | ... auth='Basic celso.providelo@canonical.com:test') |
350 | 35 | >>> registrant.open('http://launchpad.test/ubuntu/+edit') | 35 | >>> registrant.open('http://launchpad.test/ubuntu/+edit') |
352 | 36 | >>> print registrant.url | 36 | >>> print(registrant.url) |
353 | 37 | http://launchpad.test/ubuntu/+edit | 37 | http://launchpad.test/ubuntu/+edit |
354 | 38 | 38 | ||
356 | 39 | >>> print registrant.getControl(name='field.translations_usage').value[0] | 39 | >>> print(registrant.getControl(name='field.translations_usage').value[0]) |
357 | 40 | LAUNCHPAD | 40 | LAUNCHPAD |
359 | 41 | >>> print registrant.getControl(name='field.official_malone').value | 41 | >>> print(registrant.getControl(name='field.official_malone').value) |
360 | 42 | True | 42 | True |
362 | 43 | >>> print registrant.getControl(name='field.enable_bug_expiration').value | 43 | >>> print(registrant.getControl(name='field.enable_bug_expiration').value) |
363 | 44 | True | 44 | True |
365 | 45 | >>> print registrant.getControl(name='field.blueprints_usage').value[0] | 45 | >>> print(registrant.getControl(name='field.blueprints_usage').value[0]) |
366 | 46 | LAUNCHPAD | 46 | LAUNCHPAD |
368 | 47 | >>> print registrant.getControl(name='field.answers_usage').value[0] | 47 | >>> print(registrant.getControl(name='field.answers_usage').value[0]) |
369 | 48 | LAUNCHPAD | 48 | LAUNCHPAD |
372 | 49 | >>> print bool( | 49 | >>> print(bool( |
373 | 50 | ... registrant.getControl(name='field.require_virtualized').value) | 50 | ... registrant.getControl(name='field.require_virtualized').value)) |
374 | 51 | False | 51 | False |
376 | 52 | >>> print registrant.getControl(name='field.processors').value | 52 | >>> print(registrant.getControl(name='field.processors').value) |
377 | 53 | ['386', 'amd64', 'hppa'] | 53 | ['386', 'amd64', 'hppa'] |
378 | 54 | 54 | ||
379 | 55 | >>> registrant.getControl(name='field.translations_usage').value = [ | 55 | >>> registrant.getControl(name='field.translations_usage').value = [ |
380 | @@ -60,19 +60,19 @@ Just like Launchpad administrators can. | |||
381 | 60 | 60 | ||
382 | 61 | >>> admin_browser.open('http://launchpad.test/ubuntu') | 61 | >>> admin_browser.open('http://launchpad.test/ubuntu') |
383 | 62 | >>> admin_browser.getLink('Change details').click() | 62 | >>> admin_browser.getLink('Change details').click() |
385 | 63 | >>> print admin_browser.title | 63 | >>> print(admin_browser.title) |
386 | 64 | Change Ubuntu details... | 64 | Change Ubuntu details... |
389 | 65 | >>> print admin_browser.getControl( | 65 | >>> print(admin_browser.getControl( |
390 | 66 | ... name='field.translations_usage').value[0] | 66 | ... name='field.translations_usage').value[0]) |
391 | 67 | UNKNOWN | 67 | UNKNOWN |
393 | 68 | >>> print admin_browser.getControl(name='field.official_malone').value | 68 | >>> print(admin_browser.getControl(name='field.official_malone').value) |
394 | 69 | True | 69 | True |
397 | 70 | >>> print admin_browser.getControl( | 70 | >>> print(admin_browser.getControl( |
398 | 71 | ... name='field.enable_bug_expiration').value | 71 | ... name='field.enable_bug_expiration').value) |
399 | 72 | True | 72 | True |
401 | 73 | >>> print admin_browser.getControl(name='field.blueprints_usage').value[0] | 73 | >>> print(admin_browser.getControl(name='field.blueprints_usage').value[0]) |
402 | 74 | LAUNCHPAD | 74 | LAUNCHPAD |
404 | 75 | >>> print admin_browser.getControl(name='field.answers_usage').value[0] | 75 | >>> print(admin_browser.getControl(name='field.answers_usage').value[0]) |
405 | 76 | LAUNCHPAD | 76 | LAUNCHPAD |
406 | 77 | 77 | ||
407 | 78 | >>> admin_browser.getControl( | 78 | >>> admin_browser.getControl( |
408 | @@ -84,13 +84,13 @@ Just like Launchpad administrators can. | |||
409 | 84 | ... name='field.answers_usage').value = ['UNKNOWN'] | 84 | ... name='field.answers_usage').value = ['UNKNOWN'] |
410 | 85 | >>> admin_browser.getControl('Change', index=3).click() | 85 | >>> admin_browser.getControl('Change', index=3).click() |
411 | 86 | 86 | ||
413 | 87 | >>> print admin_browser.url | 87 | >>> print(admin_browser.url) |
414 | 88 | http://launchpad.test/ubuntu | 88 | http://launchpad.test/ubuntu |
415 | 89 | 89 | ||
416 | 90 | Only administators can configure the publisher for the distribution: | 90 | Only administators can configure the publisher for the distribution: |
417 | 91 | 91 | ||
418 | 92 | >>> admin_browser.getLink('Configure publisher').click() | 92 | >>> admin_browser.getLink('Configure publisher').click() |
420 | 93 | >>> print admin_browser.title | 93 | >>> print(admin_browser.title) |
421 | 94 | Publisher configuration for... | 94 | Publisher configuration for... |
422 | 95 | 95 | ||
423 | 96 | >>> admin_browser.getControl( | 96 | >>> admin_browser.getControl( |
424 | @@ -101,7 +101,7 @@ Only administators can configure the publisher for the distribution: | |||
425 | 101 | ... name='field.copy_base_url').value = "http://copy.base.url/" | 101 | ... name='field.copy_base_url').value = "http://copy.base.url/" |
426 | 102 | >>> admin_browser.getControl('Save').click() | 102 | >>> admin_browser.getControl('Save').click() |
427 | 103 | 103 | ||
429 | 104 | >>> print admin_browser.url | 104 | >>> print(admin_browser.url) |
430 | 105 | http://launchpad.test/ubuntu | 105 | http://launchpad.test/ubuntu |
431 | 106 | 106 | ||
432 | 107 | 107 | ||
433 | @@ -130,11 +130,11 @@ do not change the expiration check box, and they do the whole | |||
434 | 130 | operation before the page complete loading. | 130 | operation before the page complete loading. |
435 | 131 | 131 | ||
436 | 132 | >>> admin_browser.getLink('Change details').click() | 132 | >>> admin_browser.getLink('Change details').click() |
438 | 133 | >>> print admin_browser.getControl(name='field.official_malone').value | 133 | >>> print(admin_browser.getControl(name='field.official_malone').value) |
439 | 134 | True | 134 | True |
440 | 135 | 135 | ||
443 | 136 | >>> print admin_browser.getControl( | 136 | >>> print(admin_browser.getControl( |
444 | 137 | ... name='field.enable_bug_expiration').value | 137 | ... name='field.enable_bug_expiration').value) |
445 | 138 | True | 138 | True |
446 | 139 | 139 | ||
447 | 140 | >>> admin_browser.getControl(name='field.official_malone').value = False | 140 | >>> admin_browser.getControl(name='field.official_malone').value = False |
448 | diff --git a/lib/lp/registry/stories/distribution/xx-distribution-overview.txt b/lib/lp/registry/stories/distribution/xx-distribution-overview.txt | |||
449 | index cc5ddcf..cb14899 100644 | |||
450 | --- a/lib/lp/registry/stories/distribution/xx-distribution-overview.txt | |||
451 | +++ b/lib/lp/registry/stories/distribution/xx-distribution-overview.txt | |||
452 | @@ -14,7 +14,7 @@ Distribution listings | |||
453 | 14 | There is a listing of all distributions at /distros/: | 14 | There is a listing of all distributions at /distros/: |
454 | 15 | 15 | ||
455 | 16 | >>> anon_browser.open('http://launchpad.test/distros/') | 16 | >>> anon_browser.open('http://launchpad.test/distros/') |
457 | 17 | >>> print anon_browser.title | 17 | >>> print(anon_browser.title) |
458 | 18 | Distributions registered in Launchpad | 18 | Distributions registered in Launchpad |
459 | 19 | 19 | ||
460 | 20 | 20 | ||
461 | @@ -28,7 +28,7 @@ series. | |||
462 | 28 | Some distributions have listings of major versions, for example Debian: | 28 | Some distributions have listings of major versions, for example Debian: |
463 | 29 | 29 | ||
464 | 30 | >>> anon_browser.open('http://launchpad.test/debian') | 30 | >>> anon_browser.open('http://launchpad.test/debian') |
466 | 31 | >>> print extract_text(find_tag_by_id(anon_browser.contents, 'sandm')) | 31 | >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'sandm'))) |
467 | 32 | Active series and milestones | 32 | Active series and milestones |
468 | 33 | 3.1 āSargeā series - frozen | 33 | 3.1 āSargeā series - frozen |
469 | 34 | 3.0 āWoodyā series - current | 34 | 3.0 āWoodyā series - current |
470 | @@ -44,7 +44,7 @@ rules. | |||
471 | 44 | >>> admin_browser.getControl("Register Milestone").click() | 44 | >>> admin_browser.getControl("Register Milestone").click() |
472 | 45 | 45 | ||
473 | 46 | >>> anon_browser.open('http://launchpad.test/debian') | 46 | >>> anon_browser.open('http://launchpad.test/debian') |
475 | 47 | >>> print extract_text(find_tag_by_id(anon_browser.contents, 'sandm')) | 47 | >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'sandm'))) |
476 | 48 | Active series and milestones | 48 | Active series and milestones |
477 | 49 | ... | 49 | ... |
478 | 50 | Milestones: testmilestone, 3.1, and 3.1-rc1 | 50 | Milestones: testmilestone, 3.1, and 3.1-rc1 |
479 | @@ -77,15 +77,15 @@ to the distribution series and milestones pages respectively. | |||
480 | 77 | Others do not have any series so the portlet is not shown. | 77 | Others do not have any series so the portlet is not shown. |
481 | 78 | 78 | ||
482 | 79 | >>> anon_browser.open('http://launchpad.test/gentoo') | 79 | >>> anon_browser.open('http://launchpad.test/gentoo') |
484 | 80 | >>> print find_tag_by_id(anon_browser.contents, 'sandm') | 80 | >>> print(find_tag_by_id(anon_browser.contents, 'sandm')) |
485 | 81 | None | 81 | None |
486 | 82 | 82 | ||
487 | 83 | The 5 latest derivatives are displayed on the home page | 83 | The 5 latest derivatives are displayed on the home page |
488 | 84 | along with a link to list all of them. | 84 | along with a link to list all of them. |
489 | 85 | 85 | ||
490 | 86 | >>> anon_browser.open('http://launchpad.test/ubuntu') | 86 | >>> anon_browser.open('http://launchpad.test/ubuntu') |
493 | 87 | >>> print extract_text( | 87 | >>> print(extract_text( |
494 | 88 | ... find_tag_by_id(anon_browser.contents, 'derivatives')) | 88 | ... find_tag_by_id(anon_browser.contents, 'derivatives'))) |
495 | 89 | Latest derivatives | 89 | Latest derivatives |
496 | 90 | 9.9.9 | 90 | 9.9.9 |
497 | 91 | āHoary Mockā series | 91 | āHoary Mockā series |
498 | @@ -111,8 +111,8 @@ If there are no derivatives, the link to the derivatives page is | |||
499 | 111 | not there. | 111 | not there. |
500 | 112 | 112 | ||
501 | 113 | >>> anon_browser.open('http://launchpad.test/ubuntutest') | 113 | >>> anon_browser.open('http://launchpad.test/ubuntutest') |
504 | 114 | >>> print extract_text( | 114 | >>> print(extract_text( |
505 | 115 | ... find_tag_by_id(anon_browser.contents, 'derivatives')) | 115 | ... find_tag_by_id(anon_browser.contents, 'derivatives'))) |
506 | 116 | Latest derivatives | 116 | Latest derivatives |
507 | 117 | No derivatives. | 117 | No derivatives. |
508 | 118 | 118 | ||
509 | @@ -132,10 +132,10 @@ If there is a development series alias, it becomes a redirect. | |||
510 | 132 | ... ubuntu = getUtility(IDistributionSet).getByName(u"ubuntu") | 132 | ... ubuntu = getUtility(IDistributionSet).getByName(u"ubuntu") |
511 | 133 | ... ubuntu.development_series_alias = "devel" | 133 | ... ubuntu.development_series_alias = "devel" |
512 | 134 | >>> anon_browser.open("http://launchpad.test/ubuntu/devel") | 134 | >>> anon_browser.open("http://launchpad.test/ubuntu/devel") |
514 | 135 | >>> print anon_browser.url | 135 | >>> print(anon_browser.url) |
515 | 136 | http://launchpad.test/ubuntu/hoary | 136 | http://launchpad.test/ubuntu/hoary |
516 | 137 | >>> anon_browser.open("http://launchpad.test/ubuntu/devel/+builds") | 137 | >>> anon_browser.open("http://launchpad.test/ubuntu/devel/+builds") |
518 | 138 | >>> print anon_browser.url | 138 | >>> print(anon_browser.url) |
519 | 139 | http://launchpad.test/ubuntu/hoary/+builds | 139 | http://launchpad.test/ubuntu/hoary/+builds |
520 | 140 | 140 | ||
521 | 141 | 141 | ||
522 | @@ -146,13 +146,13 @@ The distroseries pages presents the registration information. | |||
523 | 146 | 146 | ||
524 | 147 | >>> anon_browser.open('http://launchpad.test/ubuntu') | 147 | >>> anon_browser.open('http://launchpad.test/ubuntu') |
525 | 148 | 148 | ||
528 | 149 | >>> print extract_text( | 149 | >>> print(extract_text( |
529 | 150 | ... find_tag_by_id(anon_browser.contents, 'registration')) | 150 | ... find_tag_by_id(anon_browser.contents, 'registration'))) |
530 | 151 | Registered by | 151 | Registered by |
531 | 152 | Registry Administrators | 152 | Registry Administrators |
532 | 153 | on 2006-10-16 | 153 | on 2006-10-16 |
533 | 154 | 154 | ||
535 | 155 | >>> print anon_browser.getLink('Ubuntu Team').url | 155 | >>> print(anon_browser.getLink('Ubuntu Team').url) |
536 | 156 | http://launchpad.test/~ubuntu-team | 156 | http://launchpad.test/~ubuntu-team |
537 | 157 | 157 | ||
538 | 158 | 158 | ||
539 | @@ -164,11 +164,11 @@ Displaying the page for that URL is nonsensical (it looks like the PPA | |||
540 | 164 | index page), so the view redirect it to the distribution index page. | 164 | index page), so the view redirect it to the distribution index page. |
541 | 165 | 165 | ||
542 | 166 | >>> anon_browser.open("http://launchpad.test/ubuntu/+archive/primary") | 166 | >>> anon_browser.open("http://launchpad.test/ubuntu/+archive/primary") |
544 | 167 | >>> print anon_browser.url | 167 | >>> print(anon_browser.url) |
545 | 168 | http://launchpad.test/ubuntu | 168 | http://launchpad.test/ubuntu |
546 | 169 | 169 | ||
547 | 170 | >>> anon_browser.open("http://launchpad.test/ubuntu/+archive/partner") | 170 | >>> anon_browser.open("http://launchpad.test/ubuntu/+archive/partner") |
549 | 171 | >>> print anon_browser.url | 171 | >>> print(anon_browser.url) |
550 | 172 | http://launchpad.test/ubuntu | 172 | http://launchpad.test/ubuntu |
551 | 173 | 173 | ||
552 | 174 | Any attempt to access an incomplete URL (missing the archive name | 174 | Any attempt to access an incomplete URL (missing the archive name |
553 | diff --git a/lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt b/lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt | |||
554 | index eea6781..b81fa99 100644 | |||
555 | --- a/lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt | |||
556 | +++ b/lib/lp/registry/stories/distributionmirror/xx-distribution-countrymirrors.txt | |||
557 | @@ -11,15 +11,15 @@ archive mirrors, plus the canonical one. | |||
558 | 11 | 11 | ||
559 | 12 | >>> browser.addHeader('X_FORWARDED_FOR', '83.196.46.77') | 12 | >>> browser.addHeader('X_FORWARDED_FOR', '83.196.46.77') |
560 | 13 | >>> browser.open('http://launchpad.test/ubuntu/+countrymirrors-archive') | 13 | >>> browser.open('http://launchpad.test/ubuntu/+countrymirrors-archive') |
562 | 14 | >>> print browser.headers['content-type'] | 14 | >>> print(browser.headers['content-type']) |
563 | 15 | text/plain;charset=utf-8 | 15 | text/plain;charset=utf-8 |
565 | 16 | >>> print browser.headers['X-Generated-For-Country'] | 16 | >>> print(browser.headers['X-Generated-For-Country']) |
566 | 17 | France | 17 | France |
568 | 18 | >>> print browser.headers['X-Generated-For-IP'] | 18 | >>> print(browser.headers['X-Generated-For-IP']) |
569 | 19 | 83.196.46.77 | 19 | 83.196.46.77 |
571 | 20 | >>> print browser.headers['X-REQUEST-HTTP_X_FORWARDED_FOR'] | 20 | >>> print(browser.headers['X-REQUEST-HTTP_X_FORWARDED_FOR']) |
572 | 21 | 83.196.46.77 | 21 | 83.196.46.77 |
574 | 22 | >>> print browser.headers['X-REQUEST-REMOTE_ADDR'] | 22 | >>> print(browser.headers['X-REQUEST-REMOTE_ADDR']) |
575 | 23 | 127.0.0.1 | 23 | 127.0.0.1 |
576 | 24 | >>> for url in sorted(browser.contents.split('\n')): | 24 | >>> for url in sorted(browser.contents.split('\n')): |
577 | 25 | ... print(url) | 25 | ... print(url) |
578 | @@ -32,7 +32,7 @@ canonical mirror. | |||
579 | 32 | 32 | ||
580 | 33 | >>> anon_browser.open( | 33 | >>> anon_browser.open( |
581 | 34 | ... 'http://launchpad.test/ubuntu/+countrymirrors-archive') | 34 | ... 'http://launchpad.test/ubuntu/+countrymirrors-archive') |
583 | 35 | >>> print anon_browser.headers['X-Generated-For-Country'] | 35 | >>> print(anon_browser.headers['X-Generated-For-Country']) |
584 | 36 | Unknown | 36 | Unknown |
585 | 37 | >>> for url in sorted(anon_browser.contents.split('\n')): | 37 | >>> for url in sorted(anon_browser.contents.split('\n')): |
586 | 38 | ... print(url) | 38 | ... print(url) |
587 | diff --git a/lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt b/lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt | |||
588 | index 19885a6..c694d2b 100644 | |||
589 | --- a/lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt | |||
590 | +++ b/lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt | |||
591 | @@ -13,7 +13,7 @@ on their status and content. | |||
592 | 13 | ... mirrors = [] | 13 | ... mirrors = [] |
593 | 14 | ... for tr in header.findNextSiblings('tr'): | 14 | ... for tr in header.findNextSiblings('tr'): |
594 | 15 | ... if 'head' in str(tr.attrs): | 15 | ... if 'head' in str(tr.attrs): |
596 | 16 | ... print "%s: %s" % (country, mirrors) | 16 | ... print("%s: %s" % (country, mirrors)) |
597 | 17 | ... country = extract_text(tr.find('th')) | 17 | ... country = extract_text(tr.find('th')) |
598 | 18 | ... if country == 'Total': | 18 | ... if country == 'Total': |
599 | 19 | ... break | 19 | ... break |
600 | @@ -39,7 +39,7 @@ The archive mirrors display the "freshness", how far behind they are. | |||
601 | 39 | 39 | ||
602 | 40 | >>> browser.open('http://launchpad.test/ubuntu') | 40 | >>> browser.open('http://launchpad.test/ubuntu') |
603 | 41 | >>> browser.getLink('Archive mirrors').click() | 41 | >>> browser.getLink('Archive mirrors').click() |
605 | 42 | >>> print browser.title | 42 | >>> print(browser.title) |
606 | 43 | Mirrors :... | 43 | Mirrors :... |
607 | 44 | >>> print_mirrors_by_countries(browser.contents) | 44 | >>> print_mirrors_by_countries(browser.contents) |
608 | 45 | Antarctica: | 45 | Antarctica: |
609 | @@ -89,7 +89,7 @@ seen by distro owners, mirror admins of the distro or launchpad admins. | |||
610 | 89 | >>> browser.url | 89 | >>> browser.url |
611 | 90 | 'http://launchpad.test/ubuntu/+disabledmirrors' | 90 | 'http://launchpad.test/ubuntu/+disabledmirrors' |
612 | 91 | 91 | ||
614 | 92 | >>> print find_tag_by_id(browser.contents, 'maincontent').renderContents() | 92 | >>> print(find_tag_by_id(browser.contents, 'maincontent').renderContents()) |
615 | 93 | <BLANKLINE> | 93 | <BLANKLINE> |
616 | 94 | ...We don't know of any Disabled Mirrors for this distribution... | 94 | ...We don't know of any Disabled Mirrors for this distribution... |
617 | 95 | 95 | ||
618 | diff --git a/lib/lp/registry/stories/distroseries/distroseries-admin.txt b/lib/lp/registry/stories/distroseries/distroseries-admin.txt | |||
619 | index 1edd1b1..33303f5 100644 | |||
620 | --- a/lib/lp/registry/stories/distroseries/distroseries-admin.txt | |||
621 | +++ b/lib/lp/registry/stories/distroseries/distroseries-admin.txt | |||
622 | @@ -8,29 +8,29 @@ Launchpad administrators can edit distroseries via two different | |||
623 | 8 | pages: 'Change details' and 'Administer'. | 8 | pages: 'Change details' and 'Administer'. |
624 | 9 | 9 | ||
625 | 10 | >>> admin_browser.open('http://launchpad.test/ubuntu/hoary') | 10 | >>> admin_browser.open('http://launchpad.test/ubuntu/hoary') |
627 | 11 | >>> print admin_browser.title | 11 | >>> print(admin_browser.title) |
628 | 12 | Hoary (5.04)... | 12 | Hoary (5.04)... |
629 | 13 | >>> admin_browser.getLink('Change details').click() | 13 | >>> admin_browser.getLink('Change details').click() |
631 | 14 | >>> print admin_browser.url | 14 | >>> print(admin_browser.url) |
632 | 15 | http://launchpad.test/ubuntu/hoary/+edit | 15 | http://launchpad.test/ubuntu/hoary/+edit |
633 | 16 | 16 | ||
635 | 17 | >>> print admin_browser.title | 17 | >>> print(admin_browser.title) |
636 | 18 | Edit The Hoary Hedgehog Release... | 18 | Edit The Hoary Hedgehog Release... |
637 | 19 | 19 | ||
638 | 20 | >>> admin_browser.getControl( | 20 | >>> admin_browser.getControl( |
639 | 21 | ... 'Display name', index=0).value = 'Happy' | 21 | ... 'Display name', index=0).value = 'Happy' |
640 | 22 | >>> admin_browser.getControl('Change').click() | 22 | >>> admin_browser.getControl('Change').click() |
642 | 23 | >>> print admin_browser.title | 23 | >>> print(admin_browser.title) |
643 | 24 | Happy (5.04)... | 24 | Happy (5.04)... |
644 | 25 | 25 | ||
645 | 26 | A separate administration page is available via the 'Administer' link. | 26 | A separate administration page is available via the 'Administer' link. |
646 | 27 | 27 | ||
647 | 28 | >>> admin_browser.open('http://launchpad.test/ubuntu/hoary') | 28 | >>> admin_browser.open('http://launchpad.test/ubuntu/hoary') |
648 | 29 | >>> admin_browser.getLink('Administer').click() | 29 | >>> admin_browser.getLink('Administer').click() |
650 | 30 | >>> print admin_browser.url | 30 | >>> print(admin_browser.url) |
651 | 31 | http://launchpad.test/ubuntu/hoary/+admin | 31 | http://launchpad.test/ubuntu/hoary/+admin |
652 | 32 | 32 | ||
654 | 33 | >>> print admin_browser.title | 33 | >>> print(admin_browser.title) |
655 | 34 | Administer The Hoary Hedgehog Release... | 34 | Administer The Hoary Hedgehog Release... |
656 | 35 | 35 | ||
657 | 36 | >>> admin_browser.getControl( | 36 | >>> admin_browser.getControl( |
658 | @@ -38,9 +38,9 @@ A separate administration page is available via the 'Administer' link. | |||
659 | 38 | >>> admin_browser.getControl( | 38 | >>> admin_browser.getControl( |
660 | 39 | ... 'Version', index=0).value = '5.05' | 39 | ... 'Version', index=0).value = '5.05' |
661 | 40 | >>> admin_browser.getControl('Change').click() | 40 | >>> admin_browser.getControl('Change').click() |
663 | 41 | >>> print admin_browser.url | 41 | >>> print(admin_browser.url) |
664 | 42 | http://launchpad.test/ubuntu/happy | 42 | http://launchpad.test/ubuntu/happy |
666 | 43 | >>> print admin_browser.title | 43 | >>> print(admin_browser.title) |
667 | 44 | Happy (5.05)... | 44 | Happy (5.05)... |
668 | 45 | 45 | ||
669 | 46 | 46 | ||
670 | @@ -71,10 +71,10 @@ Registry experts do have access to the administration page. | |||
671 | 71 | 71 | ||
672 | 72 | >>> registry_browser.open('http://launchpad.test/ubuntu/happy') | 72 | >>> registry_browser.open('http://launchpad.test/ubuntu/happy') |
673 | 73 | >>> registry_browser.getLink('Administer').click() | 73 | >>> registry_browser.getLink('Administer').click() |
675 | 74 | >>> print registry_browser.url | 74 | >>> print(registry_browser.url) |
676 | 75 | http://launchpad.test/ubuntu/happy/+admin | 75 | http://launchpad.test/ubuntu/happy/+admin |
677 | 76 | 76 | ||
679 | 77 | >>> print registry_browser.title | 77 | >>> print(registry_browser.title) |
680 | 78 | Administer The Hoary Hedgehog Release... | 78 | Administer The Hoary Hedgehog Release... |
681 | 79 | 79 | ||
682 | 80 | >>> registry_browser.getControl( | 80 | >>> registry_browser.getControl( |
683 | @@ -82,7 +82,7 @@ Registry experts do have access to the administration page. | |||
684 | 82 | >>> registry_browser.getControl( | 82 | >>> registry_browser.getControl( |
685 | 83 | ... 'Version', index=0).value = '5.04' | 83 | ... 'Version', index=0).value = '5.04' |
686 | 84 | >>> registry_browser.getControl('Change').click() | 84 | >>> registry_browser.getControl('Change').click() |
688 | 85 | >>> print registry_browser.url | 85 | >>> print(registry_browser.url) |
689 | 86 | http://launchpad.test/ubuntu/hoary | 86 | http://launchpad.test/ubuntu/hoary |
691 | 87 | >>> print registry_browser.title | 87 | >>> print(registry_browser.title) |
692 | 88 | Happy (5.04)... | 88 | Happy (5.04)... |
693 | diff --git a/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt b/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt | |||
694 | index 9be9c1e..f5eaa6f 100644 | |||
695 | --- a/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt | |||
696 | +++ b/lib/lp/registry/stories/distroseries/xx-distroseries-index.txt | |||
697 | @@ -6,7 +6,7 @@ this distribution series. | |||
698 | 6 | 6 | ||
699 | 7 | >>> user_browser.open('http://launchpad.test/ubuntu/hoary') | 7 | >>> user_browser.open('http://launchpad.test/ubuntu/hoary') |
700 | 8 | >>> user_browser.getLink('Help translate').click() | 8 | >>> user_browser.getLink('Help translate').click() |
702 | 9 | >>> print user_browser.title | 9 | >>> print(user_browser.title) |
703 | 10 | Hoary (5.04) : Translations : Ubuntu | 10 | Hoary (5.04) : Translations : Ubuntu |
704 | 11 | 11 | ||
705 | 12 | 12 | ||
706 | @@ -18,17 +18,17 @@ its main 'heading'. | |||
707 | 18 | 18 | ||
708 | 19 | >>> anon_browser.open('http://launchpad.test/ubuntu/warty') | 19 | >>> anon_browser.open('http://launchpad.test/ubuntu/warty') |
709 | 20 | 20 | ||
712 | 21 | >>> print extract_text( | 21 | >>> print(extract_text( |
713 | 22 | ... find_tag_by_id(anon_browser.contents, 'registration')) | 22 | ... find_tag_by_id(anon_browser.contents, 'registration'))) |
714 | 23 | Registered by | 23 | Registered by |
715 | 24 | Ubuntu Team on | 24 | Ubuntu Team on |
716 | 25 | 2006-10-16 | 25 | 2006-10-16 |
717 | 26 | 26 | ||
719 | 27 | >>> print extract_text(find_main_content(anon_browser.contents)) | 27 | >>> print(extract_text(find_main_content(anon_browser.contents))) |
720 | 28 | Warty | 28 | Warty |
721 | 29 | ... | 29 | ... |
722 | 30 | 30 | ||
724 | 31 | >>> print anon_browser.getLink('Ubuntu Team').url | 31 | >>> print(anon_browser.getLink('Ubuntu Team').url) |
725 | 32 | http://launchpad.test/~ubuntu-team | 32 | http://launchpad.test/~ubuntu-team |
726 | 33 | 33 | ||
727 | 34 | 34 | ||
728 | @@ -38,8 +38,8 @@ Details portlet | |||
729 | 38 | The distroseries page contains a details portlet giving more information | 38 | The distroseries page contains a details portlet giving more information |
730 | 39 | on the series' details. | 39 | on the series' details. |
731 | 40 | 40 | ||
734 | 41 | >>> print extract_text( | 41 | >>> print(extract_text( |
735 | 42 | ... find_portlet(anon_browser.contents, 'Series information')) | 42 | ... find_portlet(anon_browser.contents, 'Series information'))) |
736 | 43 | Series information | 43 | Series information |
737 | 44 | Distribution: Ubuntu | 44 | Distribution: Ubuntu |
738 | 45 | Series: Warty (4.10) | 45 | Series: Warty (4.10) |
739 | @@ -55,8 +55,8 @@ On series that have no source or binary packages, the portlet will | |||
740 | 55 | change its text slightly to annouce this: | 55 | change its text slightly to annouce this: |
741 | 56 | 56 | ||
742 | 57 | >>> anon_browser.open('http://launchpad.test/debian/sarge') | 57 | >>> anon_browser.open('http://launchpad.test/debian/sarge') |
745 | 58 | >>> print extract_text( | 58 | >>> print(extract_text( |
746 | 59 | ... find_portlet(anon_browser.contents, 'Series information')) | 59 | ... find_portlet(anon_browser.contents, 'Series information'))) |
747 | 60 | Series information | 60 | Series information |
748 | 61 | Distribution: Debian | 61 | Distribution: Debian |
749 | 62 | Series: Sarge (3.1) | 62 | Series: Sarge (3.1) |
750 | @@ -94,8 +94,8 @@ the series derived from this series: | |||
751 | 94 | ... for child in children] | 94 | ... for child in children] |
752 | 95 | 95 | ||
753 | 96 | >>> anon_browser.open('http://launchpad.test/debian/sarge') | 96 | >>> anon_browser.open('http://launchpad.test/debian/sarge') |
756 | 97 | >>> print extract_text( | 97 | >>> print(extract_text( |
757 | 98 | ... find_portlet(anon_browser.contents, 'Series information')) | 98 | ... find_portlet(anon_browser.contents, 'Series information'))) |
758 | 99 | Series information | 99 | Series information |
759 | 100 | Distribution: Debian | 100 | Distribution: Debian |
760 | 101 | Series: Sarge (3.1) | 101 | Series: Sarge (3.1) |
761 | @@ -116,10 +116,10 @@ series, we can create structural bug subscriptions. | |||
762 | 116 | 116 | ||
763 | 117 | >>> admin_browser.open('http://launchpad.test/ubuntu/warty') | 117 | >>> admin_browser.open('http://launchpad.test/ubuntu/warty') |
764 | 118 | >>> admin_browser.getLink('Subscribe to bug mail').click() | 118 | >>> admin_browser.getLink('Subscribe to bug mail').click() |
766 | 119 | >>> print admin_browser.url | 119 | >>> print(admin_browser.url) |
767 | 120 | http://launchpad.test/ubuntu/warty/+subscribe | 120 | http://launchpad.test/ubuntu/warty/+subscribe |
768 | 121 | 121 | ||
770 | 122 | >>> print admin_browser.title | 122 | >>> print(admin_browser.title) |
771 | 123 | Subscribe : Warty (4.10) : Bugs : Ubuntu | 123 | Subscribe : Warty (4.10) : Bugs : Ubuntu |
772 | 124 | 124 | ||
773 | 125 | 125 | ||
774 | @@ -132,8 +132,8 @@ upstream packaging. | |||
775 | 132 | >>> # Note that warty's sourcecount is stale in sample data | 132 | >>> # Note that warty's sourcecount is stale in sample data |
776 | 133 | >>> # which causes -2 need linking. | 133 | >>> # which causes -2 need linking. |
777 | 134 | >>> anon_browser.open('http://launchpad.test/ubuntu/warty') | 134 | >>> anon_browser.open('http://launchpad.test/ubuntu/warty') |
780 | 135 | >>> print extract_text( | 135 | >>> print(extract_text( |
781 | 136 | ... find_tag_by_id(anon_browser.contents, 'series-packaging')) | 136 | ... find_tag_by_id(anon_browser.contents, 'series-packaging'))) |
782 | 137 | Upstream packaging | 137 | Upstream packaging |
783 | 138 | 5 source packages are linked to registered upstream projects. | 138 | 5 source packages are linked to registered upstream projects. |
784 | 139 | 3 need linking. | 139 | 3 need linking. |
785 | diff --git a/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt b/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt | |||
786 | index f557d62..2ac0e42 100644 | |||
787 | --- a/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt | |||
788 | +++ b/lib/lp/registry/stories/distroseries/xx-show-distroseries-packaging.txt | |||
789 | @@ -6,14 +6,14 @@ series +index page. | |||
790 | 6 | 6 | ||
791 | 7 | >>> anon_browser.open('http://launchpad.test/ubuntu/hoary') | 7 | >>> anon_browser.open('http://launchpad.test/ubuntu/hoary') |
792 | 8 | >>> anon_browser.getLink('All upstream links').click() | 8 | >>> anon_browser.getLink('All upstream links').click() |
794 | 9 | >>> print anon_browser.title | 9 | >>> print(anon_browser.title) |
795 | 10 | All upstream links : ... | 10 | All upstream links : ... |
796 | 11 | 11 | ||
797 | 12 | The page lists the upstream packaging links. | 12 | The page lists the upstream packaging links. |
798 | 13 | 13 | ||
799 | 14 | >>> content = find_main_content(anon_browser.contents) | 14 | >>> content = find_main_content(anon_browser.contents) |
802 | 15 | >>> print extract_text( | 15 | >>> print(extract_text( |
803 | 16 | ... find_tag_by_id(anon_browser.contents, 'packagings')) | 16 | ... find_tag_by_id(anon_browser.contents, 'packagings'))) |
804 | 17 | Source Package Upstream Project Upstream Contributor Connections | 17 | Source Package Upstream Project Upstream Contributor Connections |
805 | 18 | netapplet | 18 | netapplet |
806 | 19 | NetApplet The Novell Network Applet | 19 | NetApplet The Novell Network Applet |
807 | @@ -30,7 +30,7 @@ The page lists the upstream packaging links. | |||
808 | 30 | Any use can see that this page is related to the needs packaging report. It | 30 | Any use can see that this page is related to the needs packaging report. It |
809 | 31 | is linked, but the link to this page is not enabled. | 31 | is linked, but the link to this page is not enabled. |
810 | 32 | 32 | ||
812 | 33 | >>> print extract_text(find_tag_by_id(content, 'related-pages')) | 33 | >>> print(extract_text(find_tag_by_id(content, 'related-pages'))) |
813 | 34 | Needs upstream links All upstream links | 34 | Needs upstream links All upstream links |
814 | 35 | 35 | ||
815 | 36 | >>> anon_browser.getLink('Needs upstream links') | 36 | >>> anon_browser.getLink('Needs upstream links') |
816 | @@ -47,14 +47,14 @@ links packages. Users can also hack the URL to set their own batch size. | |||
817 | 47 | 47 | ||
818 | 48 | >>> anon_browser.open( | 48 | >>> anon_browser.open( |
819 | 49 | ... 'http://launchpad.test/ubuntu/hoary/+packaging?start=0&batch=1') | 49 | ... 'http://launchpad.test/ubuntu/hoary/+packaging?start=0&batch=1') |
822 | 50 | >>> print extract_text(find_tag_by_id( | 50 | >>> print(extract_text(find_tag_by_id( |
823 | 51 | ... anon_browser.contents, 'packagings')) | 51 | ... anon_browser.contents, 'packagings'))) |
824 | 52 | Source Package Upstream Project Upstream Contributor Connections | 52 | Source Package Upstream Project Upstream Contributor Connections |
825 | 53 | netapplet ... | 53 | netapplet ... |
826 | 54 | 54 | ||
827 | 55 | >>> anon_browser.getLink('Next', index=0).click() | 55 | >>> anon_browser.getLink('Next', index=0).click() |
830 | 56 | >>> print extract_text( | 56 | >>> print(extract_text( |
831 | 57 | ... find_tag_by_id(anon_browser.contents, 'packagings')) | 57 | ... find_tag_by_id(anon_browser.contents, 'packagings'))) |
832 | 58 | Source Package Upstream Project Upstream Contributor Connections | 58 | Source Package Upstream Project Upstream Contributor Connections |
833 | 59 | evolution ... | 59 | evolution ... |
834 | 60 | 60 | ||
835 | @@ -77,11 +77,11 @@ packages with the greatest need are listed first. | |||
836 | 77 | 77 | ||
837 | 78 | >>> anon_browser.open('http://launchpad.test/ubuntu/hoary') | 78 | >>> anon_browser.open('http://launchpad.test/ubuntu/hoary') |
838 | 79 | >>> anon_browser.getLink('Needs upstream links').click() | 79 | >>> anon_browser.getLink('Needs upstream links').click() |
840 | 80 | >>> print anon_browser.title | 80 | >>> print(anon_browser.title) |
841 | 81 | Needs upstream links : ... | 81 | Needs upstream links : ... |
842 | 82 | 82 | ||
843 | 83 | >>> content = find_main_content(anon_browser.contents) | 83 | >>> content = find_main_content(anon_browser.contents) |
845 | 84 | >>> print extract_text(find_tag_by_id(content, 'packages')) | 84 | >>> print(extract_text(find_tag_by_id(content, 'packages'))) |
846 | 85 | Source Package Bugs Translations | 85 | Source Package Bugs Translations |
847 | 86 | pmount No bugs 64 strings | 86 | pmount No bugs 64 strings |
848 | 87 | linux-source-2.6.15 1 bug No strings | 87 | linux-source-2.6.15 1 bug No strings |
849 | @@ -103,13 +103,13 @@ pages. | |||
850 | 103 | 103 | ||
851 | 104 | The listing is batched so that the user can visit the next page listings. | 104 | The listing is batched so that the user can visit the next page listings. |
852 | 105 | 105 | ||
854 | 106 | >>> print extract_text(find_tag_by_id(content, 'listing-navigation')) | 106 | >>> print(extract_text(find_tag_by_id(content, 'listing-navigation'))) |
855 | 107 | 1 ... 5 of 5 packages First ... Previous ... Next ... Last | 107 | 1 ... 5 of 5 packages First ... Previous ... Next ... Last |
856 | 108 | 108 | ||
857 | 109 | Any use can see that this page is related to the packaging report. It is | 109 | Any use can see that this page is related to the packaging report. It is |
858 | 110 | linked, but the link to this page is not enabled. | 110 | linked, but the link to this page is not enabled. |
859 | 111 | 111 | ||
861 | 112 | >>> print extract_text(find_tag_by_id(content, 'related-pages')) | 112 | >>> print(extract_text(find_tag_by_id(content, 'related-pages'))) |
862 | 113 | Needs upstream links All upstream links | 113 | Needs upstream links All upstream links |
863 | 114 | 114 | ||
864 | 115 | >>> anon_browser.getLink('All upstream links') | 115 | >>> anon_browser.getLink('All upstream links') |
865 | diff --git a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt | |||
866 | index b7ab998..5b2819a 100644 | |||
867 | --- a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt | |||
868 | +++ b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt | |||
869 | @@ -28,7 +28,7 @@ Start out with a clean page containing no imported keys: | |||
870 | 28 | >>> browser = setupBrowserFreshLogin(name12) | 28 | >>> browser = setupBrowserFreshLogin(name12) |
871 | 29 | >>> browser.open("http://launchpad.test/~name12") | 29 | >>> browser.open("http://launchpad.test/~name12") |
872 | 30 | >>> browser.getLink(url='+editpgpkeys').click() | 30 | >>> browser.getLink(url='+editpgpkeys').click() |
874 | 31 | >>> print browser.title | 31 | >>> print(browser.title) |
875 | 32 | Change your OpenPGP keys... | 32 | Change your OpenPGP keys... |
876 | 33 | 33 | ||
877 | 34 | >>> browser.getControl(name='DEACTIVATE_GPGKEY') | 34 | >>> browser.getControl(name='DEACTIVATE_GPGKEY') |
878 | @@ -62,7 +62,7 @@ followed by ASCII armored encrypted confirmation instructions. Ensure that | |||
879 | 62 | the clear text instructions contain the expected URLs pointing to more help. | 62 | the clear text instructions contain the expected URLs pointing to more help. |
880 | 63 | 63 | ||
881 | 64 | >>> cipher_body = msg.get_payload(decode=True) | 64 | >>> cipher_body = msg.get_payload(decode=True) |
883 | 65 | >>> print cipher_body | 65 | >>> print(cipher_body) |
884 | 66 | Hello, | 66 | Hello, |
885 | 67 | <BLANKLINE> | 67 | <BLANKLINE> |
886 | 68 | This message contains the instructions for confirming registration of an | 68 | This message contains the instructions for confirming registration of an |
887 | @@ -123,7 +123,7 @@ Go to the link sent by email, to validate the email address. | |||
888 | 123 | 123 | ||
889 | 124 | Get redirected to +validategpg, and confirm token: | 124 | Get redirected to +validategpg, and confirm token: |
890 | 125 | 125 | ||
892 | 126 | >>> print browser.url | 126 | >>> print(browser.url) |
893 | 127 | http://launchpad.test/token/.../+validategpg | 127 | http://launchpad.test/token/.../+validategpg |
894 | 128 | >>> browser.getControl('Continue').click() | 128 | >>> browser.getControl('Continue').click() |
895 | 129 | 129 | ||
896 | @@ -146,9 +146,9 @@ Verify that the key was imported with the "can encrypt" flag set: | |||
897 | 146 | >>> from lp.registry.model.gpgkey import GPGKey | 146 | >>> from lp.registry.model.gpgkey import GPGKey |
898 | 147 | >>> key = GPGKey.selectOneBy( | 147 | >>> key = GPGKey.selectOneBy( |
899 | 148 | ... fingerprint='A419AE861E88BC9E04B9C26FBA2B9389DFD20543') | 148 | ... fingerprint='A419AE861E88BC9E04B9C26FBA2B9389DFD20543') |
901 | 149 | >>> print key.owner.name | 149 | >>> print(key.owner.name) |
902 | 150 | name12 | 150 | name12 |
904 | 151 | >>> print key.can_encrypt | 151 | >>> print(key.can_encrypt) |
905 | 152 | True | 152 | True |
906 | 153 | 153 | ||
907 | 154 | 154 | ||
908 | @@ -188,7 +188,7 @@ ability to decrypt text with this key. | |||
909 | 188 | The email does contain some information about the key, and a token URL | 188 | The email does contain some information about the key, and a token URL |
910 | 189 | Sample Person should visit to verify their ownership of the key. | 189 | Sample Person should visit to verify their ownership of the key. |
911 | 190 | 190 | ||
913 | 191 | >>> print body | 191 | >>> print(body) |
914 | 192 | <BLANKLINE> | 192 | <BLANKLINE> |
915 | 193 | Hello, | 193 | Hello, |
916 | 194 | ... | 194 | ... |
917 | @@ -231,7 +231,7 @@ Let's look at the text. | |||
918 | 231 | 231 | ||
919 | 232 | >>> verification_content = find_main_content( | 232 | >>> verification_content = find_main_content( |
920 | 233 | ... browser.contents).pre.string | 233 | ... browser.contents).pre.string |
922 | 234 | >>> print verification_content | 234 | >>> print(verification_content) |
923 | 235 | Please register 447DBF38C4F9C4ED752246B77D88913717B05A8F to the | 235 | Please register 447DBF38C4F9C4ED752246B77D88913717B05A8F to the |
924 | 236 | Launchpad user name12. 2005-04-01 12:00:00 UTC | 236 | Launchpad user name12. 2005-04-01 12:00:00 UTC |
925 | 237 | 237 | ||
926 | @@ -354,7 +354,7 @@ Sample person has never signed a code of conduct. | |||
927 | 354 | 354 | ||
928 | 355 | >>> browser = setupBrowser(auth='Basic test@canonical.com:test') | 355 | >>> browser = setupBrowser(auth='Basic test@canonical.com:test') |
929 | 356 | >>> browser.open('http://launchpad.test/~name12/+codesofconduct') | 356 | >>> browser.open('http://launchpad.test/~name12/+codesofconduct') |
931 | 357 | >>> print extract_text(find_main_content(browser.contents)) | 357 | >>> print(extract_text(find_main_content(browser.contents))) |
932 | 358 | Codes of Conduct for Sample Person | 358 | Codes of Conduct for Sample Person |
933 | 359 | Launchpad records codes of conduct you sign as commitments to the | 359 | Launchpad records codes of conduct you sign as commitments to the |
934 | 360 | principles of collaboration, tolerance and open communication that | 360 | principles of collaboration, tolerance and open communication that |
935 | @@ -401,11 +401,11 @@ that there is a new version available. | |||
936 | 401 | 401 | ||
937 | 402 | >>> browser.open('http://launchpad.test/codeofconduct/1.0/+sign') | 402 | >>> browser.open('http://launchpad.test/codeofconduct/1.0/+sign') |
938 | 403 | >>> browser.getLink('the current version').click() | 403 | >>> browser.getLink('the current version').click() |
940 | 404 | >>> print browser.url | 404 | >>> print(browser.url) |
941 | 405 | http://launchpad.test/codeofconduct/2.0 | 405 | http://launchpad.test/codeofconduct/2.0 |
942 | 406 | 406 | ||
943 | 407 | >>> browser.getLink('Sign it').click() | 407 | >>> browser.getLink('Sign it').click() |
945 | 408 | >>> print browser.url | 408 | >>> print(browser.url) |
946 | 409 | http://launchpad.test/codeofconduct/2.0/+sign | 409 | http://launchpad.test/codeofconduct/2.0/+sign |
947 | 410 | 410 | ||
948 | 411 | 411 | ||
949 | @@ -419,13 +419,13 @@ appear in the same order. | |||
950 | 419 | >>> reformatted_coc = read_file('reformatted_20_coc.asc') | 419 | >>> reformatted_coc = read_file('reformatted_20_coc.asc') |
951 | 420 | >>> browser.getControl('Signed Code').value = reformatted_coc | 420 | >>> browser.getControl('Signed Code').value = reformatted_coc |
952 | 421 | >>> browser.getControl('Continue').click() | 421 | >>> browser.getControl('Continue').click() |
954 | 422 | >>> print browser.url | 422 | >>> print(browser.url) |
955 | 423 | http://launchpad.test/~name12/+codesofconduct | 423 | http://launchpad.test/~name12/+codesofconduct |
956 | 424 | 424 | ||
957 | 425 | And now Sample Person's Codes of Conduct page shows that they've signed it. | 425 | And now Sample Person's Codes of Conduct page shows that they've signed it. |
958 | 426 | 426 | ||
959 | 427 | >>> browser.open('http://launchpad.test/~name12/+codesofconduct') | 427 | >>> browser.open('http://launchpad.test/~name12/+codesofconduct') |
961 | 428 | >>> print extract_text(find_main_content(browser.contents)) | 428 | >>> print(extract_text(find_main_content(browser.contents))) |
962 | 429 | Codes of Conduct for Sample Person | 429 | Codes of Conduct for Sample Person |
963 | 430 | Launchpad records codes of conduct you sign as commitments to the | 430 | Launchpad records codes of conduct you sign as commitments to the |
964 | 431 | principles of collaboration, tolerance and open communication that | 431 | principles of collaboration, tolerance and open communication that |
965 | @@ -444,7 +444,7 @@ Now Sample Person will deactivate their key... | |||
966 | 444 | >>> browser.url | 444 | >>> browser.url |
967 | 445 | 'http://launchpad.test/~name12/+editpgpkeys' | 445 | 'http://launchpad.test/~name12/+editpgpkeys' |
968 | 446 | 446 | ||
970 | 447 | >>> print browser.contents | 447 | >>> print(browser.contents) |
971 | 448 | <... | 448 | <... |
972 | 449 | ...Your active keys... | 449 | ...Your active keys... |
973 | 450 | ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543... | 450 | ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543... |
974 | @@ -454,7 +454,7 @@ Now Sample Person will deactivate their key... | |||
975 | 454 | 454 | ||
976 | 455 | >>> browser.getControl('Deactivate Key').click() | 455 | >>> browser.getControl('Deactivate Key').click() |
977 | 456 | >>> for tag in find_main_content(browser.contents)('p', 'error message'): | 456 | >>> for tag in find_main_content(browser.contents)('p', 'error message'): |
979 | 457 | ... print tag.renderContents() | 457 | ... print(tag.renderContents()) |
980 | 458 | No key(s) selected for deactivation. | 458 | No key(s) selected for deactivation. |
981 | 459 | 459 | ||
982 | 460 | 460 | ||
983 | @@ -465,7 +465,7 @@ Now they select the checkbox and deactivate it. | |||
984 | 465 | >>> browser.getControl('Deactivate Key').click() | 465 | >>> browser.getControl('Deactivate Key').click() |
985 | 466 | >>> soup = find_main_content(browser.contents) | 466 | >>> soup = find_main_content(browser.contents) |
986 | 467 | >>> for tag in soup('p', 'informational message'): | 467 | >>> for tag in soup('p', 'informational message'): |
988 | 468 | ... print tag.renderContents() | 468 | ... print(tag.renderContents()) |
989 | 469 | Deactivated key(s): 1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543 | 469 | Deactivated key(s): 1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543 |
990 | 470 | 470 | ||
991 | 471 | 471 | ||
992 | @@ -475,7 +475,7 @@ Sample Person already has a deactivated key. | |||
993 | 475 | >>> browser.url | 475 | >>> browser.url |
994 | 476 | 'http://launchpad.test/~name12/+editpgpkeys' | 476 | 'http://launchpad.test/~name12/+editpgpkeys' |
995 | 477 | 477 | ||
997 | 478 | >>> print browser.contents | 478 | >>> print(browser.contents) |
998 | 479 | <... | 479 | <... |
999 | 480 | ...Deactivated keys... | 480 | ...Deactivated keys... |
1000 | 481 | ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543... | 481 | ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543... |
1001 | @@ -486,7 +486,7 @@ Now they'll request their key to be reactivated. | |||
1002 | 486 | >>> browser.getControl('Reactivate Key').click() | 486 | >>> browser.getControl('Reactivate Key').click() |
1003 | 487 | >>> soup = find_main_content(browser.contents) | 487 | >>> soup = find_main_content(browser.contents) |
1004 | 488 | >>> for tag in soup('p', 'error message'): | 488 | >>> for tag in soup('p', 'error message'): |
1006 | 489 | ... print tag.renderContents() | 489 | ... print(tag.renderContents()) |
1007 | 490 | No key(s) selected for reactivation. | 490 | No key(s) selected for reactivation. |
1008 | 491 | 491 | ||
1009 | 492 | >>> browser.getControl( | 492 | >>> browser.getControl( |
1010 | @@ -494,7 +494,7 @@ Now they'll request their key to be reactivated. | |||
1011 | 494 | >>> browser.getControl('Reactivate Key').click() | 494 | >>> browser.getControl('Reactivate Key').click() |
1012 | 495 | >>> soup = find_main_content(browser.contents) | 495 | >>> soup = find_main_content(browser.contents) |
1013 | 496 | >>> for tag in soup('p', 'informational message'): | 496 | >>> for tag in soup('p', 'informational message'): |
1015 | 497 | ... print tag.renderContents() | 497 | ... print(tag.renderContents()) |
1016 | 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... |
1017 | 499 | 499 | ||
1018 | 500 | 500 | ||
1019 | @@ -518,7 +518,7 @@ token type (+validategpg). | |||
1020 | 518 | >>> browser.url == '%s/+validategpg' % token_url | 518 | >>> browser.url == '%s/+validategpg' % token_url |
1021 | 519 | True | 519 | True |
1022 | 520 | 520 | ||
1024 | 521 | >>> print browser.contents | 521 | >>> print(browser.contents) |
1025 | 522 | <... | 522 | <... |
1026 | 523 | ...Confirm the OpenPGP key...A419AE861E88BC9E04B9C26FBA2B9389DFD20543... | 523 | ...Confirm the OpenPGP key...A419AE861E88BC9E04B9C26FBA2B9389DFD20543... |
1027 | 524 | ...Sample Person... | 524 | ...Sample Person... |
1028 | @@ -530,7 +530,7 @@ Now Sample Person confirms the reactivation. | |||
1029 | 530 | >>> browser.url | 530 | >>> browser.url |
1030 | 531 | 'http://launchpad.test/~name12' | 531 | 'http://launchpad.test/~name12' |
1031 | 532 | 532 | ||
1033 | 533 | >>> print browser.contents | 533 | >>> print(browser.contents) |
1034 | 534 | <... | 534 | <... |
1035 | 535 | ...Key 1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543 successfully | 535 | ...Key 1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543 successfully |
1036 | 536 | reactivated... | 536 | reactivated... |
1037 | @@ -539,7 +539,7 @@ Now Sample Person confirms the reactivation. | |||
1038 | 539 | And now we can see the key listed as one of Sample Person's active keys. | 539 | And now we can see the key listed as one of Sample Person's active keys. |
1039 | 540 | 540 | ||
1040 | 541 | >>> browser.open('http://launchpad.test/~name12/+editpgpkeys') | 541 | >>> browser.open('http://launchpad.test/~name12/+editpgpkeys') |
1042 | 542 | >>> print browser.contents | 542 | >>> print(browser.contents) |
1043 | 543 | <... | 543 | <... |
1044 | 544 | ...Your active keys... | 544 | ...Your active keys... |
1045 | 545 | ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543... | 545 | ...1024D/A419AE861E88BC9E04B9C26FBA2B9389DFD20543... |
1046 | @@ -567,7 +567,7 @@ Try to import a key which is already imported: | |||
1047 | 567 | False | 567 | False |
1048 | 568 | >>> stub.test_emails | 568 | >>> stub.test_emails |
1049 | 569 | [] | 569 | [] |
1051 | 570 | >>> print browser.contents | 570 | >>> print(browser.contents) |
1052 | 571 | <BLANKLINE> | 571 | <BLANKLINE> |
1053 | 572 | ... | 572 | ... |
1054 | 573 | ...has already been imported... | 573 | ...has already been imported... |
1055 | @@ -578,11 +578,11 @@ Try to import a key which is already imported: | |||
1056 | 578 | 578 | ||
1057 | 579 | Ensure we are raising 404 error instead of System Error | 579 | Ensure we are raising 404 error instead of System Error |
1058 | 580 | 580 | ||
1060 | 581 | >>> print http(r""" | 581 | >>> print(http(r""" |
1061 | 582 | ... POST /codeofconduct/donkey HTTP/1.1 | 582 | ... POST /codeofconduct/donkey HTTP/1.1 |
1062 | 583 | ... Authorization: Basic Zm9vLmJhckBjYW5vbmljYWwuY29tOnRlc3Q= | 583 | ... Authorization: Basic Zm9vLmJhckBjYW5vbmljYWwuY29tOnRlc3Q= |
1063 | 584 | ... Referer: https://launchpad.test/ | 584 | ... Referer: https://launchpad.test/ |
1065 | 585 | ... """) | 585 | ... """)) |
1066 | 586 | HTTP/1.1 404 Not Found | 586 | HTTP/1.1 404 Not Found |
1067 | 587 | ... | 587 | ... |
1068 | 588 | 588 | ||
1069 | @@ -613,7 +613,7 @@ Ensure the CoC was acknowledge by searching in the CoC Admin Console: | |||
1070 | 613 | >>> admin_browser.getControl(name='searchfor').value = ["all"] | 613 | >>> admin_browser.getControl(name='searchfor').value = ["all"] |
1071 | 614 | >>> admin_browser.getControl(name='name').value = "mark" | 614 | >>> admin_browser.getControl(name='name').value = "mark" |
1072 | 615 | >>> admin_browser.getControl(name='search').click() | 615 | >>> admin_browser.getControl(name='search').click() |
1074 | 616 | >>> print extract_text(find_tag_by_id(admin_browser.contents, 'matches')) | 616 | >>> print(extract_text(find_tag_by_id(admin_browser.contents, 'matches'))) |
1075 | 617 | Mark ... paper submission accepted by Foo Bar [ACTIVE] | 617 | Mark ... paper submission accepted by Foo Bar [ACTIVE] |
1076 | 618 | 618 | ||
1077 | 619 | Test if the advertisement email was sent: | 619 | Test if the advertisement email was sent: |
1078 | @@ -622,7 +622,7 @@ Test if the advertisement email was sent: | |||
1079 | 622 | >>> from lp.services.mail import stub | 622 | >>> from lp.services.mail import stub |
1080 | 623 | >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop() | 623 | >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop() |
1081 | 624 | >>> msg = email.message_from_string(raw_msg) | 624 | >>> msg = email.message_from_string(raw_msg) |
1083 | 625 | >>> print msg.get_payload(decode=True) | 625 | >>> print(msg.get_payload(decode=True)) |
1084 | 626 | <BLANKLINE> | 626 | <BLANKLINE> |
1085 | 627 | ... | 627 | ... |
1086 | 628 | User: 'Mark Shuttleworth' | 628 | User: 'Mark Shuttleworth' |
1087 | 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 | |||
1088 | index 7bcc4c2..58dc5c4 100644 | |||
1089 | --- a/lib/lp/registry/stories/gpg-coc/xx-ubuntu-codeofconduct-signer.txt | |||
1090 | +++ b/lib/lp/registry/stories/gpg-coc/xx-ubuntu-codeofconduct-signer.txt | |||
1091 | @@ -7,21 +7,21 @@ Administrators can see the signed Ubuntu Code of Conducts of any given person. | |||
1092 | 7 | >>> admin_browser.open('http://launchpad.test/~name16') | 7 | >>> admin_browser.open('http://launchpad.test/~name16') |
1093 | 8 | >>> admin_browser.url | 8 | >>> admin_browser.url |
1094 | 9 | 'http://launchpad.test/~name16' | 9 | 'http://launchpad.test/~name16' |
1097 | 10 | >>> print extract_text( | 10 | >>> print(extract_text( |
1098 | 11 | ... find_tag_by_id(admin_browser.contents, 'ubuntu-coc')) | 11 | ... find_tag_by_id(admin_browser.contents, 'ubuntu-coc'))) |
1099 | 12 | Signed Ubuntu Code of Conduct: Yes | 12 | Signed Ubuntu Code of Conduct: Yes |
1100 | 13 | 13 | ||
1101 | 14 | >>> admin_browser.getLink(url='+codesofconduct').click() | 14 | >>> admin_browser.getLink(url='+codesofconduct').click() |
1102 | 15 | >>> signatures = find_tags_by_class(admin_browser.contents, 'signature') | 15 | >>> signatures = find_tags_by_class(admin_browser.contents, 'signature') |
1103 | 16 | >>> for signature in signatures: | 16 | >>> for signature in signatures: |
1105 | 17 | ... print extract_text(signature) | 17 | ... print(extract_text(signature)) |
1106 | 18 | 2005-09-27: digitally signed by Foo Bar | 18 | 2005-09-27: digitally signed by Foo Bar |
1107 | 19 | (1024D/ABCDEF0123456789ABCDDCBA0000111112345678) | 19 | (1024D/ABCDEF0123456789ABCDDCBA0000111112345678) |
1108 | 20 | 20 | ||
1109 | 21 | A regular user can't see the link to Foo Bar's signed codes of conduct. | 21 | A regular user can't see the link to Foo Bar's signed codes of conduct. |
1110 | 22 | 22 | ||
1111 | 23 | >>> browser.open('http://launchpad.test/~name16') | 23 | >>> browser.open('http://launchpad.test/~name16') |
1113 | 24 | >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc')) | 24 | >>> print(extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc'))) |
1114 | 25 | Signed Ubuntu Code of Conduct: Yes | 25 | Signed Ubuntu Code of Conduct: Yes |
1115 | 26 | 26 | ||
1116 | 27 | >>> browser.getLink(url='+codesofconduct') | 27 | >>> browser.getLink(url='+codesofconduct') |
1117 | @@ -34,7 +34,7 @@ link to the Ubuntu Code of Conduct forms. | |||
1118 | 34 | 34 | ||
1119 | 35 | >>> browser.addHeader('Authorization', 'Basic no-priv@canonical.com:test') | 35 | >>> browser.addHeader('Authorization', 'Basic no-priv@canonical.com:test') |
1120 | 36 | >>> browser.open('http://launchpad.test/~no-priv') | 36 | >>> browser.open('http://launchpad.test/~no-priv') |
1122 | 37 | >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc')) | 37 | >>> print(extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc'))) |
1123 | 38 | Signed Ubuntu Code of Conduct: No | 38 | Signed Ubuntu Code of Conduct: No |
1124 | 39 | 39 | ||
1125 | 40 | >>> browser.getLink(url='codeofconduct') | 40 | >>> browser.getLink(url='codeofconduct') |
1126 | diff --git a/lib/lp/registry/stories/location/personlocation-edit.txt b/lib/lp/registry/stories/location/personlocation-edit.txt | |||
1127 | index 53a5d66..a70877e 100644 | |||
1128 | --- a/lib/lp/registry/stories/location/personlocation-edit.txt | |||
1129 | +++ b/lib/lp/registry/stories/location/personlocation-edit.txt | |||
1130 | @@ -36,5 +36,5 @@ selected value. | |||
1131 | 36 | 36 | ||
1132 | 37 | >>> self_browser.open('http://launchpad.test/~zzz') | 37 | >>> self_browser.open('http://launchpad.test/~zzz') |
1133 | 38 | >>> self_browser.getLink('Set location and time zone').click() | 38 | >>> self_browser.getLink('Set location and time zone').click() |
1135 | 39 | >>> print self_browser.getControl(name='field.time_zone').value | 39 | >>> print(self_browser.getControl(name='field.time_zone').value) |
1136 | 40 | ['Europe/Madrid'] | 40 | ['Europe/Madrid'] |
1137 | diff --git a/lib/lp/registry/stories/mailinglists/hosted-email-address.txt b/lib/lp/registry/stories/mailinglists/hosted-email-address.txt | |||
1138 | index ec44e44..f9cebb1 100644 | |||
1139 | --- a/lib/lp/registry/stories/mailinglists/hosted-email-address.txt | |||
1140 | +++ b/lib/lp/registry/stories/mailinglists/hosted-email-address.txt | |||
1141 | @@ -38,7 +38,7 @@ Launchpad sends that address a confirmation message. | |||
1142 | 38 | >>> user_browser.getControl( | 38 | >>> user_browser.getControl( |
1143 | 39 | ... name='field.contact_address').value = 'bar@example.com' | 39 | ... name='field.contact_address').value = 'bar@example.com' |
1144 | 40 | >>> user_browser.getControl('Change').click() | 40 | >>> user_browser.getControl('Change').click() |
1146 | 41 | >>> print user_browser.title | 41 | >>> print(user_browser.title) |
1147 | 42 | Aardvarks in Launchpad | 42 | Aardvarks in Launchpad |
1148 | 43 | >>> print_feedback_messages(user_browser.contents) | 43 | >>> print_feedback_messages(user_browser.contents) |
1149 | 44 | A confirmation message has been sent to... | 44 | A confirmation message has been sent to... |
1150 | @@ -47,9 +47,9 @@ Launchpad sends that address a confirmation message. | |||
1151 | 47 | [] | 47 | [] |
1152 | 48 | >>> import email | 48 | >>> import email |
1153 | 49 | >>> msg = email.message_from_string(raw_msg) | 49 | >>> msg = email.message_from_string(raw_msg) |
1155 | 50 | >>> print msg['From'] | 50 | >>> print(msg['From']) |
1156 | 51 | Launchpad Email Validator <noreply@launchpad.net> | 51 | Launchpad Email Validator <noreply@launchpad.net> |
1158 | 52 | >>> print msg['Subject'] | 52 | >>> print(msg['Subject']) |
1159 | 53 | Launchpad: Validate your team's contact email address | 53 | Launchpad: Validate your team's contact email address |
1160 | 54 | 54 | ||
1161 | 55 | When the confirmation token url is followed, the external email address is | 55 | When the confirmation token url is followed, the external email address is |
1162 | @@ -59,10 +59,10 @@ confirmed. | |||
1163 | 59 | ... get_token_url_from_email) | 59 | ... get_token_url_from_email) |
1164 | 60 | >>> token_url = get_token_url_from_email(raw_msg) | 60 | >>> token_url = get_token_url_from_email(raw_msg) |
1165 | 61 | >>> user_browser.open(token_url) | 61 | >>> user_browser.open(token_url) |
1167 | 62 | >>> print user_browser.title | 62 | >>> print(user_browser.title) |
1168 | 63 | Confirm email address | 63 | Confirm email address |
1169 | 64 | >>> user_browser.getControl('Continue').click() | 64 | >>> user_browser.getControl('Continue').click() |
1171 | 65 | >>> print user_browser.title | 65 | >>> print(user_browser.title) |
1172 | 66 | Aardvarks in Launchpad | 66 | Aardvarks in Launchpad |
1173 | 67 | >>> print_feedback_messages(user_browser.contents) | 67 | >>> print_feedback_messages(user_browser.contents) |
1174 | 68 | Email address successfully confirmed. | 68 | Email address successfully confirmed. |
1175 | diff --git a/lib/lp/registry/stories/mailinglists/lifecycle.txt b/lib/lp/registry/stories/mailinglists/lifecycle.txt | |||
1176 | index ca20341..fccd031 100644 | |||
1177 | --- a/lib/lp/registry/stories/mailinglists/lifecycle.txt | |||
1178 | +++ b/lib/lp/registry/stories/mailinglists/lifecycle.txt | |||
1179 | @@ -15,19 +15,19 @@ The owner of Landscape Developers applies for a mailing list. | |||
1180 | 15 | >>> browser.open('http://launchpad.test/~landscape-developers') | 15 | >>> browser.open('http://launchpad.test/~landscape-developers') |
1181 | 16 | >>> browser.getLink(url='+mailinglist').click() | 16 | >>> browser.getLink(url='+mailinglist').click() |
1182 | 17 | >>> from lp.services.helpers import backslashreplace | 17 | >>> from lp.services.helpers import backslashreplace |
1184 | 18 | >>> print backslashreplace(browser.title) | 18 | >>> print(backslashreplace(browser.title)) |
1185 | 19 | Mailing list configuration... | 19 | Mailing list configuration... |
1186 | 20 | 20 | ||
1187 | 21 | They think for a second whether their mailing list is for Ubuntu or not. | 21 | They think for a second whether their mailing list is for Ubuntu or not. |
1188 | 22 | 22 | ||
1190 | 23 | >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-notice')) | 23 | >>> print(extract_text(find_tag_by_id(browser.contents, 'ubuntu-notice'))) |
1191 | 24 | Ubuntu does not use Launchpad to host its mailing lists. Create them | 24 | Ubuntu does not use Launchpad to host its mailing lists. Create them |
1192 | 25 | at lists.ubuntu.com instead. | 25 | at lists.ubuntu.com instead. |
1194 | 26 | >>> print browser.getLink('lists.ubuntu.com') | 26 | >>> print(browser.getLink('lists.ubuntu.com')) |
1195 | 27 | <Link text='lists.ubuntu.com' url='https://lists.ubuntu.com'> | 27 | <Link text='lists.ubuntu.com' url='https://lists.ubuntu.com'> |
1196 | 28 | 28 | ||
1197 | 29 | >>> browser.getControl('Create new Mailing List').click() | 29 | >>> browser.getControl('Create new Mailing List').click() |
1199 | 30 | >>> print browser.title | 30 | >>> print(browser.title) |
1200 | 31 | Landscape Developers in Launchpad | 31 | Landscape Developers in Launchpad |
1201 | 32 | >>> print_feedback_messages(browser.contents) | 32 | >>> print_feedback_messages(browser.contents) |
1202 | 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. |
1203 | @@ -52,7 +52,7 @@ Just because a mailing list has been applied for does not mean it has an | |||
1204 | 52 | archive link yet. | 52 | archive link yet. |
1205 | 53 | 53 | ||
1206 | 54 | >>> browser.open('http://launchpad.test/~landscape-developers') | 54 | >>> browser.open('http://launchpad.test/~landscape-developers') |
1208 | 55 | >>> print find_tag_by_id(browser.contents, 'mailing-list-archive') | 55 | >>> print(find_tag_by_id(browser.contents, 'mailing-list-archive')) |
1209 | 56 | None | 56 | None |
1210 | 57 | 57 | ||
1211 | 58 | Even after the list has been created, it still cannot be used as the contact | 58 | Even after the list has been created, it still cannot be used as the contact |
1212 | @@ -60,7 +60,7 @@ address until Mailman has acknowledged successful creation. | |||
1213 | 60 | 60 | ||
1214 | 61 | >>> browser.reload() | 61 | >>> browser.reload() |
1215 | 62 | >>> browser.getLink(url='+mailinglist').click() | 62 | >>> browser.getLink(url='+mailinglist').click() |
1217 | 63 | >>> print mailing_list_status_message(browser.contents) | 63 | >>> print(mailing_list_status_message(browser.contents)) |
1218 | 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. |
1219 | 65 | 65 | ||
1220 | 66 | Mailman eventually wakes up and creates the mailing list. | 66 | Mailman eventually wakes up and creates the mailing list. |
1221 | @@ -78,14 +78,14 @@ is true even if no messages have yet been posted to the mailing list (since | |||
1222 | 78 | the archiver will display an informative message to that effect). | 78 | the archiver will display an informative message to that effect). |
1223 | 79 | 79 | ||
1224 | 80 | >>> browser.open('http://launchpad.test/~landscape-developers') | 80 | >>> browser.open('http://launchpad.test/~landscape-developers') |
1227 | 81 | >>> print extract_link_from_tag( | 81 | >>> print(extract_link_from_tag( |
1228 | 82 | ... find_tag_by_id(browser.contents, 'mailing-list-archive')) | 82 | ... find_tag_by_id(browser.contents, 'mailing-list-archive'))) |
1229 | 83 | http://lists.launchpad.test/landscape-developers | 83 | http://lists.launchpad.test/landscape-developers |
1230 | 84 | 84 | ||
1231 | 85 | The team's overview page also displays the posting address. | 85 | The team's overview page also displays the posting address. |
1232 | 86 | 86 | ||
1235 | 87 | >>> print extract_text( | 87 | >>> print(extract_text( |
1236 | 88 | ... find_tag_by_id(browser.contents, 'mailing-list-posting-address')) | 88 | ... find_tag_by_id(browser.contents, 'mailing-list-posting-address'))) |
1237 | 89 | landscape-developers@lists.launchpad.test | 89 | landscape-developers@lists.launchpad.test |
1238 | 90 | 90 | ||
1239 | 91 | Now that the mailing list is active, it can be used as the team's contact | 91 | Now that the mailing list is active, it can be used as the team's contact |
1240 | @@ -94,8 +94,8 @@ address. | |||
1241 | 94 | >>> from lp.testing.pages import strip_label | 94 | >>> from lp.testing.pages import strip_label |
1242 | 95 | 95 | ||
1243 | 96 | >>> browser.getLink(url='+mailinglist').click() | 96 | >>> browser.getLink(url='+mailinglist').click() |
1246 | 97 | >>> print extract_text(find_tag_by_id(browser.contents, | 97 | >>> print(extract_text(find_tag_by_id(browser.contents, |
1247 | 98 | ... 'mailing_list_not_contact_address')) | 98 | ... 'mailing_list_not_contact_address'))) |
1248 | 99 | The mailing list is not set as the team contact address. You can | 99 | The mailing list is not set as the team contact address. You can |
1249 | 100 | set it. | 100 | set it. |
1250 | 101 | 101 | ||
1251 | @@ -110,7 +110,7 @@ address. | |||
1252 | 110 | 110 | ||
1253 | 111 | The mailing list's configuration screen is also now available. | 111 | The mailing list's configuration screen is also now available. |
1254 | 112 | 112 | ||
1256 | 113 | >>> print browser.getLink(url='+mailinglist').url | 113 | >>> print(browser.getLink(url='+mailinglist').url) |
1257 | 114 | http://launchpad.test/~landscape-developers/+mailinglist | 114 | http://launchpad.test/~landscape-developers/+mailinglist |
1258 | 115 | 115 | ||
1259 | 116 | When the mailing list is not the team's contact address, the mailing | 116 | When the mailing list is not the team's contact address, the mailing |
1260 | @@ -120,8 +120,8 @@ list configuration screen displays a message to this effect. | |||
1261 | 120 | >>> browser.getControl('Change').click() | 120 | >>> browser.getControl('Change').click() |
1262 | 121 | 121 | ||
1263 | 122 | >>> browser.getLink(url='+mailinglist').click() | 122 | >>> browser.getLink(url='+mailinglist').click() |
1266 | 123 | >>> print extract_text(find_tag_by_id(browser.contents, | 123 | >>> print(extract_text(find_tag_by_id(browser.contents, |
1267 | 124 | ... 'mailing_list_not_contact_address')) | 124 | ... 'mailing_list_not_contact_address'))) |
1268 | 125 | The mailing list is not set as the team contact address. You can | 125 | The mailing list is not set as the team contact address. You can |
1269 | 126 | set it. | 126 | set it. |
1270 | 127 | 127 | ||
1271 | @@ -130,7 +130,7 @@ The message contains a link to the contact address screen. | |||
1272 | 130 | >>> browser.getLink('set it').click() | 130 | >>> browser.getLink('set it').click() |
1273 | 131 | >>> browser.getControl('The Launchpad mailing list').selected = True | 131 | >>> browser.getControl('The Launchpad mailing list').selected = True |
1274 | 132 | >>> browser.getControl('Change').click() | 132 | >>> browser.getControl('Change').click() |
1276 | 133 | >>> print browser.title | 133 | >>> print(browser.title) |
1277 | 134 | Landscape Developers in Launchpad | 134 | Landscape Developers in Launchpad |
1278 | 135 | 135 | ||
1279 | 136 | When the mailing list is the team's contact address, the message does | 136 | When the mailing list is the team's contact address, the message does |
1280 | @@ -169,15 +169,15 @@ to 'each user individually'. | |||
1281 | 169 | >>> act() | 169 | >>> act() |
1282 | 170 | >>> browser.open( | 170 | >>> browser.open( |
1283 | 171 | ... 'http://launchpad.test/~landscape-developers/+mailinglist') | 171 | ... 'http://launchpad.test/~landscape-developers/+mailinglist') |
1285 | 172 | >>> print mailing_list_status_message(browser.contents) | 172 | >>> print(mailing_list_status_message(browser.contents)) |
1286 | 173 | This team's mailing list has been deactivated. | 173 | This team's mailing list has been deactivated. |
1287 | 174 | 174 | ||
1288 | 175 | A deactivated mailing list still has a link to its archive, because archives | 175 | A deactivated mailing list still has a link to its archive, because archives |
1289 | 176 | are never deleted. | 176 | are never deleted. |
1290 | 177 | 177 | ||
1291 | 178 | >>> browser.open('http://launchpad.test/~landscape-developers') | 178 | >>> browser.open('http://launchpad.test/~landscape-developers') |
1294 | 179 | >>> print extract_link_from_tag( | 179 | >>> print(extract_link_from_tag( |
1295 | 180 | ... find_tag_by_id(browser.contents, 'mailing-list-archive')) | 180 | ... find_tag_by_id(browser.contents, 'mailing-list-archive'))) |
1296 | 181 | http://lists.launchpad.test/landscape-developers | 181 | http://lists.launchpad.test/landscape-developers |
1297 | 182 | 182 | ||
1298 | 183 | An inactive mailing list can be reactivated. | 183 | An inactive mailing list can be reactivated. |
1299 | @@ -205,8 +205,8 @@ This does not restore the mailing list as the team's contact method: | |||
1300 | 205 | Of course, the reactivated list still has a link to its archive. | 205 | Of course, the reactivated list still has a link to its archive. |
1301 | 206 | 206 | ||
1302 | 207 | >>> browser.open('http://launchpad.test/~landscape-developers') | 207 | >>> browser.open('http://launchpad.test/~landscape-developers') |
1305 | 208 | >>> print extract_link_from_tag( | 208 | >>> print(extract_link_from_tag( |
1306 | 209 | ... find_tag_by_id(browser.contents, 'mailing-list-archive')) | 209 | ... find_tag_by_id(browser.contents, 'mailing-list-archive'))) |
1307 | 210 | http://lists.launchpad.test/landscape-developers | 210 | http://lists.launchpad.test/landscape-developers |
1308 | 211 | 211 | ||
1309 | 212 | The archive link is only available for public mailing lists as shown above, | 212 | The archive link is only available for public mailing lists as shown above, |
1310 | @@ -222,8 +222,8 @@ and for private mailing lists for team members. | |||
1311 | 222 | The owner of the list can see archive link. | 222 | The owner of the list can see archive link. |
1312 | 223 | 223 | ||
1313 | 224 | >>> user_browser.open('http://launchpad.test/~bassists') | 224 | >>> user_browser.open('http://launchpad.test/~bassists') |
1316 | 225 | >>> print extract_link_from_tag( | 225 | >>> print(extract_link_from_tag( |
1317 | 226 | ... find_tag_by_id(user_browser.contents, 'mailing-list-archive')) | 226 | ... find_tag_by_id(user_browser.contents, 'mailing-list-archive'))) |
1318 | 227 | http://lists.launchpad.test/bassists | 227 | http://lists.launchpad.test/bassists |
1319 | 228 | 228 | ||
1320 | 229 | Anonymous users cannot see the link, because they cannot even see the | 229 | Anonymous users cannot see the link, because they cannot even see the |
1321 | @@ -255,15 +255,15 @@ Members who are not owners can see the link. | |||
1322 | 255 | >>> admin_browser.getControl('Add Member').click() | 255 | >>> admin_browser.getControl('Add Member').click() |
1323 | 256 | 256 | ||
1324 | 257 | >>> cprov_browser.open('http://launchpad.test/~bassists') | 257 | >>> cprov_browser.open('http://launchpad.test/~bassists') |
1327 | 258 | >>> print extract_link_from_tag( | 258 | >>> print(extract_link_from_tag( |
1328 | 259 | ... find_tag_by_id(cprov_browser.contents, 'mailing-list-archive')) | 259 | ... find_tag_by_id(cprov_browser.contents, 'mailing-list-archive'))) |
1329 | 260 | http://lists.launchpad.test/bassists | 260 | http://lists.launchpad.test/bassists |
1330 | 261 | 261 | ||
1331 | 262 | Admins who are not members of the team can see the link too. | 262 | Admins who are not members of the team can see the link too. |
1332 | 263 | 263 | ||
1333 | 264 | >>> admin_browser.open('http://launchpad.test/~bassists') | 264 | >>> admin_browser.open('http://launchpad.test/~bassists') |
1336 | 265 | >>> print extract_link_from_tag( | 265 | >>> print(extract_link_from_tag( |
1337 | 266 | ... find_tag_by_id(admin_browser.contents, 'mailing-list-archive')) | 266 | ... find_tag_by_id(admin_browser.contents, 'mailing-list-archive'))) |
1338 | 267 | http://lists.launchpad.test/bassists | 267 | http://lists.launchpad.test/bassists |
1339 | 268 | 268 | ||
1340 | 269 | 269 | ||
1341 | @@ -287,14 +287,14 @@ to delete the archives of an INACTIVE list, this must be done manually. | |||
1342 | 287 | >>> def print_list_state(team_name=u'aardvarks'): | 287 | >>> def print_list_state(team_name=u'aardvarks'): |
1343 | 288 | ... login('foo.bar@canonical.com') | 288 | ... login('foo.bar@canonical.com') |
1344 | 289 | ... mailing_list = getUtility(IMailingListSet).get(team_name) | 289 | ... mailing_list = getUtility(IMailingListSet).get(team_name) |
1346 | 290 | ... print mailing_list.status.name | 290 | ... print(mailing_list.status.name) |
1347 | 291 | ... logout() | 291 | ... logout() |
1348 | 292 | 292 | ||
1349 | 293 | The team owner can see that they can purge or reactivate mailing list. | 293 | The team owner can see that they can purge or reactivate mailing list. |
1350 | 294 | 294 | ||
1351 | 295 | >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist') | 295 | >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist') |
1352 | 296 | >>> user_browser.getControl('Create new Mailing List').click() | 296 | >>> user_browser.getControl('Create new Mailing List').click() |
1354 | 297 | >>> print user_browser.title | 297 | >>> print(user_browser.title) |
1355 | 298 | Aardvarks in Launchpad | 298 | Aardvarks in Launchpad |
1356 | 299 | >>> act() | 299 | >>> act() |
1357 | 300 | >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist') | 300 | >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist') |
1358 | @@ -310,7 +310,7 @@ The team owner can see that they can purge or reactivate mailing list. | |||
1359 | 310 | ... return tag.p.contents[0].strip() | 310 | ... return tag.p.contents[0].strip() |
1360 | 311 | 311 | ||
1361 | 312 | >>> user_browser.getLink(url='+mailinglist').click() | 312 | >>> user_browser.getLink(url='+mailinglist').click() |
1363 | 313 | >>> print purge_text(user_browser) | 313 | >>> print(purge_text(user_browser)) |
1364 | 314 | You can purge this mailing list... | 314 | You can purge this mailing list... |
1365 | 315 | 315 | ||
1366 | 316 | >>> user_browser.getControl('Reactivate this Mailing List') | 316 | >>> user_browser.getControl('Reactivate this Mailing List') |
1367 | @@ -338,7 +338,7 @@ administrator, can purge a list. | |||
1368 | 338 | 338 | ||
1369 | 339 | >>> expert_browser = setupBrowser('Basic test@canonical.com:test') | 339 | >>> expert_browser = setupBrowser('Basic test@canonical.com:test') |
1370 | 340 | >>> expert_browser.open('http://launchpad.test/~aardvarks/+mailinglist') | 340 | >>> expert_browser.open('http://launchpad.test/~aardvarks/+mailinglist') |
1372 | 341 | >>> print purge_text(expert_browser) | 341 | >>> print(purge_text(expert_browser)) |
1373 | 342 | You can purge this mailing list... | 342 | You can purge this mailing list... |
1374 | 343 | 343 | ||
1375 | 344 | A constructing, modified, updating, or deactivating or mod-failed list cannot | 344 | A constructing, modified, updating, or deactivating or mod-failed list cannot |
1376 | @@ -361,9 +361,9 @@ be purged. | |||
1377 | 361 | ... set_list_state(u'aardvarks', status) | 361 | ... set_list_state(u'aardvarks', status) |
1378 | 362 | ... print_list_state() | 362 | ... print_list_state() |
1379 | 363 | ... admin_browser.open(url) | 363 | ... admin_browser.open(url) |
1381 | 364 | ... print purge_text(admin_browser) | 364 | ... print(purge_text(admin_browser)) |
1382 | 365 | ... expert_browser.open(url) | 365 | ... expert_browser.open(url) |
1384 | 366 | ... print purge_text(expert_browser) | 366 | ... print(purge_text(expert_browser)) |
1385 | 367 | 367 | ||
1386 | 368 | A purged list acts as if it doesn't even exist. | 368 | A purged list acts as if it doesn't even exist. |
1387 | 369 | 369 | ||
1388 | diff --git a/lib/lp/registry/stories/mailinglists/subscriptions.txt b/lib/lp/registry/stories/mailinglists/subscriptions.txt | |||
1389 | index d993e0a..9cbc162 100644 | |||
1390 | --- a/lib/lp/registry/stories/mailinglists/subscriptions.txt | |||
1391 | +++ b/lib/lp/registry/stories/mailinglists/subscriptions.txt | |||
1392 | @@ -92,7 +92,7 @@ it's currently the team contact method. | |||
1393 | 92 | >>> carlos_browser.getLink(url="+editmailinglists").click() | 92 | >>> carlos_browser.getLink(url="+editmailinglists").click() |
1394 | 93 | 93 | ||
1395 | 94 | >>> from lp.services.helpers import backslashreplace | 94 | >>> from lp.services.helpers import backslashreplace |
1397 | 95 | >>> print backslashreplace(carlos_browser.title) | 95 | >>> print(backslashreplace(carlos_browser.title)) |
1398 | 96 | Change your mailing list subscriptions... | 96 | Change your mailing list subscriptions... |
1399 | 97 | 97 | ||
1400 | 98 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') | 98 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') |
1401 | @@ -103,9 +103,9 @@ it's currently the team contact method. | |||
1402 | 103 | ['Preferred address', "Don't subscribe", | 103 | ['Preferred address', "Don't subscribe", |
1403 | 104 | 'carlos@canonical.com', 'carlos@test.com'] | 104 | 'carlos@canonical.com', 'carlos@test.com'] |
1404 | 105 | 105 | ||
1406 | 106 | >>> print admins.value | 106 | >>> print(admins.value) |
1407 | 107 | ["Don't subscribe"] | 107 | ["Don't subscribe"] |
1409 | 108 | >>> print rosetta_admins.value | 108 | >>> print(rosetta_admins.value) |
1410 | 109 | ["Don't subscribe"] | 109 | ["Don't subscribe"] |
1411 | 110 | 110 | ||
1412 | 111 | However, testing-spanish-team's list doesn't show up because its creation has | 111 | However, testing-spanish-team's list doesn't show up because its creation has |
1413 | @@ -133,9 +133,9 @@ explicitly with whatever is his preferred email address. | |||
1414 | 133 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') | 133 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') |
1415 | 134 | >>> rosetta_admins = carlos_browser.getControl( | 134 | >>> rosetta_admins = carlos_browser.getControl( |
1416 | 135 | ... name='field.subscription.rosetta-admins') | 135 | ... name='field.subscription.rosetta-admins') |
1418 | 136 | >>> print admins.value | 136 | >>> print(admins.value) |
1419 | 137 | ['Preferred address'] | 137 | ['Preferred address'] |
1421 | 138 | >>> print rosetta_admins.value | 138 | >>> print(rosetta_admins.value) |
1422 | 139 | ["Don't subscribe"] | 139 | ["Don't subscribe"] |
1423 | 140 | 140 | ||
1424 | 141 | Carlos can subscribe to a list using any of his validated addresses | 141 | Carlos can subscribe to a list using any of his validated addresses |
1425 | @@ -148,9 +148,9 @@ explicitly. | |||
1426 | 148 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') | 148 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') |
1427 | 149 | >>> rosetta_admins = carlos_browser.getControl( | 149 | >>> rosetta_admins = carlos_browser.getControl( |
1428 | 150 | ... name='field.subscription.rosetta-admins') | 150 | ... name='field.subscription.rosetta-admins') |
1430 | 151 | >>> print admins.value | 151 | >>> print(admins.value) |
1431 | 152 | ['carlos@canonical.com'] | 152 | ['carlos@canonical.com'] |
1433 | 153 | >>> print rosetta_admins.value | 153 | >>> print(rosetta_admins.value) |
1434 | 154 | ['carlos@test.com'] | 154 | ['carlos@test.com'] |
1435 | 155 | 155 | ||
1436 | 156 | He can switch from one address to another, or from a specific address | 156 | He can switch from one address to another, or from a specific address |
1437 | @@ -163,9 +163,9 @@ to the preferred address. | |||
1438 | 163 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') | 163 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') |
1439 | 164 | >>> rosetta_admins = carlos_browser.getControl( | 164 | >>> rosetta_admins = carlos_browser.getControl( |
1440 | 165 | ... name='field.subscription.rosetta-admins') | 165 | ... name='field.subscription.rosetta-admins') |
1442 | 166 | >>> print admins.value | 166 | >>> print(admins.value) |
1443 | 167 | ['Preferred address'] | 167 | ['Preferred address'] |
1445 | 168 | >>> print rosetta_admins.value | 168 | >>> print(rosetta_admins.value) |
1446 | 169 | ['carlos@canonical.com'] | 169 | ['carlos@canonical.com'] |
1447 | 170 | 170 | ||
1448 | 171 | Finally, he can unsubscribe from any mailing list by setting the subscription | 171 | Finally, he can unsubscribe from any mailing list by setting the subscription |
1449 | @@ -181,9 +181,9 @@ menu item to "Don't subscribe". | |||
1450 | 181 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') | 181 | >>> admins = carlos_browser.getControl(name='field.subscription.admins') |
1451 | 182 | >>> rosetta_admins = carlos_browser.getControl( | 182 | >>> rosetta_admins = carlos_browser.getControl( |
1452 | 183 | ... name='field.subscription.rosetta-admins') | 183 | ... name='field.subscription.rosetta-admins') |
1454 | 184 | >>> print admins.value | 184 | >>> print(admins.value) |
1455 | 185 | ["Don't subscribe"] | 185 | ["Don't subscribe"] |
1457 | 186 | >>> print rosetta_admins.value | 186 | >>> print(rosetta_admins.value) |
1458 | 187 | ["Don't subscribe"] | 187 | ["Don't subscribe"] |
1459 | 188 | 188 | ||
1460 | 189 | 189 | ||
1461 | @@ -200,7 +200,7 @@ Admins team, and he should know if the list is available. | |||
1462 | 200 | 200 | ||
1463 | 201 | >>> carlos_browser.open('http://launchpad.test/~carlos') | 201 | >>> carlos_browser.open('http://launchpad.test/~carlos') |
1464 | 202 | >>> carlos_browser.getLink(url="+editmailinglists").click() | 202 | >>> carlos_browser.getLink(url="+editmailinglists").click() |
1466 | 203 | >>> print backslashreplace(carlos_browser.title) | 203 | >>> print(backslashreplace(carlos_browser.title)) |
1467 | 204 | Change your mailing list subscriptions... | 204 | Change your mailing list subscriptions... |
1468 | 205 | 205 | ||
1469 | 206 | >>> rosetta_admins = carlos_browser.getControl( | 206 | >>> rosetta_admins = carlos_browser.getControl( |
1470 | @@ -223,7 +223,7 @@ Now Jdub can apply for team membership and mailing list access. | |||
1471 | 223 | 'http://launchpad.test/~rosetta-admins' | 223 | 'http://launchpad.test/~rosetta-admins' |
1472 | 224 | 224 | ||
1473 | 225 | >>> for tag in find_tags_by_class(browser.contents, 'informational'): | 225 | >>> for tag in find_tags_by_class(browser.contents, 'informational'): |
1475 | 226 | ... print tag.renderContents() | 226 | ... print(tag.renderContents()) |
1476 | 227 | Your request to join Rosetta Administrators is awaiting approval. | 227 | Your request to join Rosetta Administrators is awaiting approval. |
1477 | 228 | Your mailing list subscription is awaiting approval. | 228 | Your mailing list subscription is awaiting approval. |
1478 | 229 | 229 | ||
1479 | @@ -237,7 +237,7 @@ screen. | |||
1480 | 237 | >>> jdub_browser = setupBrowserFreshLogin(jdub) | 237 | >>> jdub_browser = setupBrowserFreshLogin(jdub) |
1481 | 238 | >>> jdub_browser.open('http://launchpad.test/~jdub') | 238 | >>> jdub_browser.open('http://launchpad.test/~jdub') |
1482 | 239 | >>> jdub_browser.getLink(url="+editmailinglists").click() | 239 | >>> jdub_browser.getLink(url="+editmailinglists").click() |
1484 | 240 | >>> print jdub_browser.title | 240 | >>> print(jdub_browser.title) |
1485 | 241 | Change your mailing list subscriptions... | 241 | Change your mailing list subscriptions... |
1486 | 242 | 242 | ||
1487 | 243 | >>> jdub_browser.getControl( | 243 | >>> jdub_browser.getControl( |
1488 | @@ -254,7 +254,7 @@ been approved for the team. | |||
1489 | 254 | >>> admin_browser.getLink('All members').click() | 254 | >>> admin_browser.getLink('All members').click() |
1490 | 255 | >>> admin_browser.getLink( | 255 | >>> admin_browser.getLink( |
1491 | 256 | ... url='/~rosetta-admins/+member/jdub').click() | 256 | ... url='/~rosetta-admins/+member/jdub').click() |
1493 | 257 | >>> print admin_browser.url | 257 | >>> print(admin_browser.url) |
1494 | 258 | http://launchpad.test/~rosetta-admins/+member/jdub | 258 | http://launchpad.test/~rosetta-admins/+member/jdub |
1495 | 259 | >>> admin_browser.getControl(name='approve').click() | 259 | >>> admin_browser.getControl(name='approve').click() |
1496 | 260 | 260 | ||
1497 | @@ -262,7 +262,7 @@ His mailing list subscription is now available to be managed. | |||
1498 | 262 | 262 | ||
1499 | 263 | >>> jdub_browser.open('http://launchpad.test/~jdub') | 263 | >>> jdub_browser.open('http://launchpad.test/~jdub') |
1500 | 264 | >>> jdub_browser.getLink(url="+editmailinglists").click() | 264 | >>> jdub_browser.getLink(url="+editmailinglists").click() |
1502 | 265 | >>> print jdub_browser.title | 265 | >>> print(jdub_browser.title) |
1503 | 266 | Change your mailing list subscriptions... | 266 | Change your mailing list subscriptions... |
1504 | 267 | 267 | ||
1505 | 268 | >>> rosetta_team = jdub_browser.getControl( | 268 | >>> rosetta_team = jdub_browser.getControl( |
1506 | @@ -280,7 +280,7 @@ list is not presented. | |||
1507 | 280 | 280 | ||
1508 | 281 | >>> browser.open('http://launchpad.test/~rosetta-admins') | 281 | >>> browser.open('http://launchpad.test/~rosetta-admins') |
1509 | 282 | >>> browser.getLink('Join the team').click() | 282 | >>> browser.getLink('Join the team').click() |
1511 | 283 | >>> print browser.url | 283 | >>> print(browser.url) |
1512 | 284 | http://launchpad.test/~rosetta-admins/+join | 284 | http://launchpad.test/~rosetta-admins/+join |
1513 | 285 | 285 | ||
1514 | 286 | >>> browser.getControl(name='mailinglist_subscribe') | 286 | >>> browser.getControl(name='mailinglist_subscribe') |
1515 | @@ -294,7 +294,7 @@ for teams that don't have mailing lists. | |||
1516 | 294 | 294 | ||
1517 | 295 | >>> browser.open('http://launchpad.test/~testing-spanish-team') | 295 | >>> browser.open('http://launchpad.test/~testing-spanish-team') |
1518 | 296 | >>> browser.getLink('Join the team').click() | 296 | >>> browser.getLink('Join the team').click() |
1520 | 297 | >>> print browser.url | 297 | >>> print(browser.url) |
1521 | 298 | http://launchpad.test/~testing-spanish-team/+join | 298 | http://launchpad.test/~testing-spanish-team/+join |
1522 | 299 | 299 | ||
1523 | 300 | >>> browser.getControl(name='mailinglist_subscribe') | 300 | >>> browser.getControl(name='mailinglist_subscribe') |
1524 | @@ -309,7 +309,7 @@ if we visit the URL directly, as the link is not present on the Team | |||
1525 | 309 | Overview.) | 309 | Overview.) |
1526 | 310 | 310 | ||
1527 | 311 | >>> browser.open('http://launchpad.test/~launchpad/+join') | 311 | >>> browser.open('http://launchpad.test/~launchpad/+join') |
1529 | 312 | >>> print browser.url | 312 | >>> print(browser.url) |
1530 | 313 | http://launchpad.test/~launchpad/+join | 313 | http://launchpad.test/~launchpad/+join |
1531 | 314 | 314 | ||
1532 | 315 | >>> browser.getControl(name='mailinglist_subscribe') | 315 | >>> browser.getControl(name='mailinglist_subscribe') |
1533 | @@ -330,7 +330,7 @@ page, because he is not subscribed to the team mailing list. | |||
1534 | 330 | 330 | ||
1535 | 331 | >>> carlos_browser.open('http://launchpad.test/~admins') | 331 | >>> carlos_browser.open('http://launchpad.test/~admins') |
1536 | 332 | >>> carlos_browser.getLink('Subscribe to mailing list').click() | 332 | >>> carlos_browser.getLink('Subscribe to mailing list').click() |
1538 | 333 | >>> print carlos_browser.url | 333 | >>> print(carlos_browser.url) |
1539 | 334 | http://launchpad.test/~carlos/+editmailinglists | 334 | http://launchpad.test/~carlos/+editmailinglists |
1540 | 335 | 335 | ||
1541 | 336 | The unsubscribe link is visible for the rosetta admins team, which | 336 | The unsubscribe link is visible for the rosetta admins team, which |
1542 | @@ -343,11 +343,11 @@ has an active mailing list. | |||
1543 | 343 | ... name='field.subscription.rosetta-admins') | 343 | ... name='field.subscription.rosetta-admins') |
1544 | 344 | >>> rosetta_admins.value = ['Preferred address'] | 344 | >>> rosetta_admins.value = ['Preferred address'] |
1545 | 345 | >>> carlos_browser.getControl('Update Subscriptions').click() | 345 | >>> carlos_browser.getControl('Update Subscriptions').click() |
1547 | 346 | >>> print rosetta_admins.value | 346 | >>> print(rosetta_admins.value) |
1548 | 347 | ['Preferred address'] | 347 | ['Preferred address'] |
1549 | 348 | >>> for tag in find_tags_by_class( | 348 | >>> for tag in find_tags_by_class( |
1550 | 349 | ... carlos_browser.contents, 'informational'): | 349 | ... carlos_browser.contents, 'informational'): |
1552 | 350 | ... print tag.renderContents() | 350 | ... print(tag.renderContents()) |
1553 | 351 | Subscriptions updated. | 351 | Subscriptions updated. |
1554 | 352 | 352 | ||
1555 | 353 | >>> carlos_browser.open('http://launchpad.test/~rosetta-admins') | 353 | >>> carlos_browser.open('http://launchpad.test/~rosetta-admins') |
1556 | @@ -361,8 +361,8 @@ Clicking the link will unsubscribe you from the list immediately. | |||
1557 | 361 | You have been unsubscribed from the team mailing list. | 361 | You have been unsubscribed from the team mailing list. |
1558 | 362 | 362 | ||
1559 | 363 | >>> carlos_browser.open('http://launchpad.test/~rosetta-admins') | 363 | >>> carlos_browser.open('http://launchpad.test/~rosetta-admins') |
1562 | 364 | >>> print extract_text( | 364 | >>> print(extract_text( |
1563 | 365 | ... find_tag_by_id(carlos_browser.contents, 'mailing-lists')) | 365 | ... find_tag_by_id(carlos_browser.contents, 'mailing-lists'))) |
1564 | 366 | Mailing list... | 366 | Mailing list... |
1565 | 367 | Subscribe to mailing list... | 367 | Subscribe to mailing list... |
1566 | 368 | 368 | ||
1567 | @@ -370,8 +370,8 @@ The Ubuntu translators team, which does not have any lists configured, | |||
1568 | 370 | does not show either link. | 370 | does not show either link. |
1569 | 371 | 371 | ||
1570 | 372 | >>> carlos_browser.open('http://launchpad.test/~ubuntu-translators') | 372 | >>> carlos_browser.open('http://launchpad.test/~ubuntu-translators') |
1573 | 373 | >>> print extract_text( | 373 | >>> print(extract_text( |
1574 | 374 | ... find_portlet(carlos_browser.contents, 'Mailing list')) | 374 | ... find_portlet(carlos_browser.contents, 'Mailing list'))) |
1575 | 375 | Mailing list | 375 | Mailing list |
1576 | 376 | This team does not use Launchpad to host a mailing list. | 376 | This team does not use Launchpad to host a mailing list. |
1577 | 377 | Create a mailing list | 377 | Create a mailing list |
1578 | @@ -395,8 +395,8 @@ mailing list subscribers, if there is an active mailing list. The | |||
1579 | 395 | rosetta admins team has such a list and carlos is the owner. | 395 | rosetta admins team has such a list and carlos is the owner. |
1580 | 396 | 396 | ||
1581 | 397 | >>> carlos_browser.open('http://launchpad.test/~rosetta-admins') | 397 | >>> carlos_browser.open('http://launchpad.test/~rosetta-admins') |
1584 | 398 | >>> print extract_text( | 398 | >>> print(extract_text( |
1585 | 399 | ... find_portlet(carlos_browser.contents, 'Mailing list')) | 399 | ... find_portlet(carlos_browser.contents, 'Mailing list'))) |
1586 | 400 | Mailing list | 400 | Mailing list |
1587 | 401 | rosetta-admins@lists.launchpad.test | 401 | rosetta-admins@lists.launchpad.test |
1588 | 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. |
1589 | @@ -409,11 +409,11 @@ The mailing list for Rosetta Admins has no subscribers. | |||
1590 | 409 | because his membership on Rosetta Admins hasn't been approved) | 409 | because his membership on Rosetta Admins hasn't been approved) |
1591 | 410 | 410 | ||
1592 | 411 | >>> carlos_browser.getLink('View subscribers').click() | 411 | >>> carlos_browser.getLink('View subscribers').click() |
1594 | 412 | >>> print carlos_browser.title | 412 | >>> print(carlos_browser.title) |
1595 | 413 | Mailing list subscribers for the Rosetta Administrators team... | 413 | Mailing list subscribers for the Rosetta Administrators team... |
1596 | 414 | 414 | ||
1599 | 415 | >>> print extract_text( | 415 | >>> print(extract_text( |
1600 | 416 | ... find_tag_by_id(carlos_browser.contents, 'subscribers')) | 416 | ... find_tag_by_id(carlos_browser.contents, 'subscribers'))) |
1601 | 417 | Nobody has subscribed to this team's mailing list yet. | 417 | Nobody has subscribed to this team's mailing list yet. |
1602 | 418 | 418 | ||
1603 | 419 | If it had subscribers, though, they'd be shown on that page, in a batched | 419 | If it had subscribers, though, they'd be shown on that page, in a batched |
1604 | @@ -439,15 +439,15 @@ list. | |||
1605 | 439 | >>> rosetta_admins.mailing_list.subscribe(jordi) | 439 | >>> rosetta_admins.mailing_list.subscribe(jordi) |
1606 | 440 | >>> logout() | 440 | >>> logout() |
1607 | 441 | >>> carlos_browser.reload() | 441 | >>> carlos_browser.reload() |
1610 | 442 | >>> print extract_text( | 442 | >>> print(extract_text( |
1611 | 443 | ... find_tag_by_id(carlos_browser.contents, 'subscribers')) | 443 | ... find_tag_by_id(carlos_browser.contents, 'subscribers'))) |
1612 | 444 | The following people are subscribed... | 444 | The following people are subscribed... |
1613 | 445 | Guilherme Salgado | 445 | Guilherme Salgado |
1614 | 446 | 1 of 2 results... | 446 | 1 of 2 results... |
1615 | 447 | 447 | ||
1616 | 448 | >>> carlos_browser.getLink('Next').click() | 448 | >>> carlos_browser.getLink('Next').click() |
1619 | 449 | >>> print extract_text( | 449 | >>> print(extract_text( |
1620 | 450 | ... find_tag_by_id(carlos_browser.contents, 'subscribers')) | 450 | ... find_tag_by_id(carlos_browser.contents, 'subscribers'))) |
1621 | 451 | The following people are subscribed... | 451 | The following people are subscribed... |
1622 | 452 | Jordi Mallach | 452 | Jordi Mallach |
1623 | 453 | 2 of 2 results... | 453 | 2 of 2 results... |
1624 | @@ -474,7 +474,7 @@ list based on a setting in the person's Email preferences page. | |||
1625 | 474 | 474 | ||
1626 | 475 | >>> carlos_browser.open('http://launchpad.test/~carlos') | 475 | >>> carlos_browser.open('http://launchpad.test/~carlos') |
1627 | 476 | >>> carlos_browser.getLink(url="+editmailinglists").click() | 476 | >>> carlos_browser.getLink(url="+editmailinglists").click() |
1629 | 477 | >>> print backslashreplace(carlos_browser.title) | 477 | >>> print(backslashreplace(carlos_browser.title)) |
1630 | 478 | Change your mailing list subscriptions... | 478 | Change your mailing list subscriptions... |
1631 | 479 | 479 | ||
1632 | 480 | Carlos's default setting, 'Ask me when I join a team', is still in place. | 480 | Carlos's default setting, 'Ask me when I join a team', is still in place. |
1633 | @@ -534,8 +534,8 @@ team they are a member of creates a new mailing list. This notification | |||
1634 | 534 | offers them to join the new mailing list. This page informs them of this | 534 | offers them to join the new mailing list. This page informs them of this |
1635 | 535 | behaviour. | 535 | behaviour. |
1636 | 536 | 536 | ||
1639 | 537 | >>> print extract_text( | 537 | >>> print(extract_text( |
1640 | 538 | ... find_tag_by_id(carlos_browser.contents, 'notification-info')) | 538 | ... find_tag_by_id(carlos_browser.contents, 'notification-info'))) |
1641 | 539 | When a team you are a member of creates a new mailing list, you will | 539 | When a team you are a member of creates a new mailing list, you will |
1642 | 540 | receive an email notification offering you the opportunity to join the new | 540 | receive an email notification offering you the opportunity to join the new |
1643 | 541 | mailing list. Launchpad can also automatically subscribe you to a team's | 541 | mailing list. Launchpad can also automatically subscribe you to a team's |
1644 | @@ -562,10 +562,10 @@ subscription settings will see the box checked by default. | |||
1645 | 562 | 562 | ||
1646 | 563 | >>> browser.open('http://launchpad.test/~rosetta-admins') | 563 | >>> browser.open('http://launchpad.test/~rosetta-admins') |
1647 | 564 | >>> browser.getLink('Join the team').click() | 564 | >>> browser.getLink('Join the team').click() |
1649 | 565 | >>> print browser.url | 565 | >>> print(browser.url) |
1650 | 566 | http://launchpad.test/~rosetta-admins/+join | 566 | http://launchpad.test/~rosetta-admins/+join |
1651 | 567 | 567 | ||
1653 | 568 | >>> print browser.getControl(name='field.mailinglist_subscribe').value | 568 | >>> print(browser.getControl(name='field.mailinglist_subscribe').value) |
1654 | 569 | True | 569 | True |
1655 | 570 | 570 | ||
1656 | 571 | # Change James' setting | 571 | # Change James' setting |
1657 | @@ -578,7 +578,7 @@ subscription settings will see the box checked by default. | |||
1658 | 578 | 578 | ||
1659 | 579 | >>> browser.open('http://launchpad.test/~rosetta-admins') | 579 | >>> browser.open('http://launchpad.test/~rosetta-admins') |
1660 | 580 | >>> browser.getLink('Join the team').click() | 580 | >>> browser.getLink('Join the team').click() |
1662 | 581 | >>> print browser.getControl(name='field.mailinglist_subscribe').value | 581 | >>> print(browser.getControl(name='field.mailinglist_subscribe').value) |
1663 | 582 | True | 582 | True |
1664 | 583 | 583 | ||
1665 | 584 | Users who have chosen to never be auto-subscribed to mailing | 584 | Users who have chosen to never be auto-subscribed to mailing |
1666 | @@ -594,8 +594,8 @@ lists will not have the box checked. | |||
1667 | 594 | 594 | ||
1668 | 595 | >>> browser.open('http://launchpad.test/~rosetta-admins') | 595 | >>> browser.open('http://launchpad.test/~rosetta-admins') |
1669 | 596 | >>> browser.getLink('Join the team').click() | 596 | >>> browser.getLink('Join the team').click() |
1672 | 597 | >>> print bool( | 597 | >>> print(bool( |
1673 | 598 | ... browser.getControl(name='field.mailinglist_subscribe').value) | 598 | ... browser.getControl(name='field.mailinglist_subscribe').value)) |
1674 | 599 | False | 599 | False |
1675 | 600 | 600 | ||
1676 | 601 | # Restore James' setting. | 601 | # Restore James' setting. |
1677 | diff --git a/lib/lp/registry/stories/mailinglists/welcome-message.txt b/lib/lp/registry/stories/mailinglists/welcome-message.txt | |||
1678 | index 2565616..d7dd43d 100644 | |||
1679 | --- a/lib/lp/registry/stories/mailinglists/welcome-message.txt | |||
1680 | +++ b/lib/lp/registry/stories/mailinglists/welcome-message.txt | |||
1681 | @@ -22,7 +22,7 @@ Changes to the welcome message take effect as soon as Mailman can act on it. | |||
1682 | 22 | 22 | ||
1683 | 23 | >>> user_browser.getLink('Configure mailing list').click() | 23 | >>> user_browser.getLink('Configure mailing list').click() |
1684 | 24 | >>> welcome_message = user_browser.getControl('Welcome message') | 24 | >>> welcome_message = user_browser.getControl('Welcome message') |
1686 | 25 | >>> print welcome_message.value | 25 | >>> print(welcome_message.value) |
1687 | 26 | Welcome to the Aardvarks. | 26 | Welcome to the Aardvarks. |
1688 | 27 | 27 | ||
1689 | 28 | >>> from lp.registry.tests import mailinglists_helper | 28 | >>> from lp.registry.tests import mailinglists_helper |
1690 | @@ -55,6 +55,6 @@ What if Mailman failed to apply the change? | |||
1691 | 55 | >>> logout() | 55 | >>> logout() |
1692 | 56 | 56 | ||
1693 | 57 | >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist') | 57 | >>> user_browser.open('http://launchpad.test/~aardvarks/+mailinglist') |
1696 | 58 | >>> print extract_text(find_tag_by_id( | 58 | >>> print(extract_text(find_tag_by_id( |
1697 | 59 | ... user_browser.contents, 'mailing_list_status_message').strong) | 59 | ... user_browser.contents, 'mailing_list_status_message').strong)) |
1698 | 60 | This team's mailing list is in an inconsistent state... | 60 | This team's mailing list is in an inconsistent state... |
1699 | diff --git a/lib/lp/registry/stories/milestone/object-milestones.txt b/lib/lp/registry/stories/milestone/object-milestones.txt | |||
1700 | index eb0efe0..5eaf227 100644 | |||
1701 | --- a/lib/lp/registry/stories/milestone/object-milestones.txt | |||
1702 | +++ b/lib/lp/registry/stories/milestone/object-milestones.txt | |||
1703 | @@ -46,7 +46,7 @@ Distributions | |||
1704 | 46 | >>> anon_browser.url | 46 | >>> anon_browser.url |
1705 | 47 | 'http://launchpad.test/debian/+milestones' | 47 | 'http://launchpad.test/debian/+milestones' |
1706 | 48 | 48 | ||
1708 | 49 | >>> print all_milestones(anon_browser) | 49 | >>> print(all_milestones(anon_browser)) |
1709 | 50 | Debian 3.1 Woody ... | 50 | Debian 3.1 Woody ... |
1710 | 51 | Debian 3.1-rc1 Woody ... | 51 | Debian 3.1-rc1 Woody ... |
1711 | 52 | 52 | ||
1712 | @@ -55,12 +55,12 @@ Distribution Series | |||
1713 | 55 | ................... | 55 | ................... |
1714 | 56 | 56 | ||
1715 | 57 | >>> anon_browser.open('http://launchpad.test/debian/woody/+milestones') | 57 | >>> anon_browser.open('http://launchpad.test/debian/woody/+milestones') |
1717 | 58 | >>> print all_milestones(anon_browser) | 58 | >>> print(all_milestones(anon_browser)) |
1718 | 59 | Debian 3.1 ... | 59 | Debian 3.1 ... |
1719 | 60 | Debian 3.1-rc1 ... | 60 | Debian 3.1-rc1 ... |
1720 | 61 | 61 | ||
1721 | 62 | >>> anon_browser.open('http://launchpad.test/debian/sarge/+milestones') | 62 | >>> anon_browser.open('http://launchpad.test/debian/sarge/+milestones') |
1723 | 63 | >>> print all_milestones(anon_browser) | 63 | >>> print(all_milestones(anon_browser)) |
1724 | 64 | None | 64 | None |
1725 | 65 | 65 | ||
1726 | 66 | 66 | ||
1727 | @@ -75,7 +75,7 @@ counts (because they are costly to retrieve). | |||
1728 | 75 | >>> anon_browser.url | 75 | >>> anon_browser.url |
1729 | 76 | 'http://launchpad.test/firefox/+milestones' | 76 | 'http://launchpad.test/firefox/+milestones' |
1730 | 77 | 77 | ||
1732 | 78 | >>> print all_milestones(anon_browser) | 78 | >>> print(all_milestones(anon_browser)) |
1733 | 79 | Mozilla Firefox 1.0.0 "First Stable Release" 1.0 None ... | 79 | Mozilla Firefox 1.0.0 "First Stable Release" 1.0 None ... |
1734 | 80 | Mozilla Firefox 0.9.2 "One (secure) Tree Hill" trunk None ... | 80 | Mozilla Firefox 0.9.2 "One (secure) Tree Hill" trunk None ... |
1735 | 81 | Mozilla Firefox 0.9.1 "One Tree Hill (v2)" trunk None ... | 81 | Mozilla Firefox 0.9.1 "One Tree Hill (v2)" trunk None ... |
1736 | @@ -88,7 +88,7 @@ link to the project groups's milestone's page. | |||
1737 | 88 | 88 | ||
1738 | 89 | >>> anon_browser.getLink( | 89 | >>> anon_browser.getLink( |
1739 | 90 | ... 'View milestones for The Mozilla Project').click() | 90 | ... 'View milestones for The Mozilla Project').click() |
1741 | 91 | >>> print anon_browser.title | 91 | >>> print(anon_browser.title) |
1742 | 92 | Milestones : The Mozilla Project | 92 | Milestones : The Mozilla Project |
1743 | 93 | 93 | ||
1744 | 94 | 94 | ||
1745 | @@ -96,14 +96,14 @@ Product Series | |||
1746 | 96 | .............. | 96 | .............. |
1747 | 97 | 97 | ||
1748 | 98 | >>> anon_browser.open('http://launchpad.test/firefox/trunk/+milestones') | 98 | >>> anon_browser.open('http://launchpad.test/firefox/trunk/+milestones') |
1750 | 99 | >>> print all_milestones(anon_browser) | 99 | >>> print(all_milestones(anon_browser)) |
1751 | 100 | Mozilla Firefox 0.9.2 ... | 100 | Mozilla Firefox 0.9.2 ... |
1752 | 101 | Mozilla Firefox 0.9.1 ... | 101 | Mozilla Firefox 0.9.1 ... |
1753 | 102 | Mozilla Firefox 0.9 ... | 102 | Mozilla Firefox 0.9 ... |
1754 | 103 | Mozilla Firefox 1.0 ... | 103 | Mozilla Firefox 1.0 ... |
1755 | 104 | 104 | ||
1756 | 105 | >>> anon_browser.open('http://launchpad.test/firefox/1.0/+milestones') | 105 | >>> anon_browser.open('http://launchpad.test/firefox/1.0/+milestones') |
1758 | 106 | >>> print all_milestones(anon_browser) | 106 | >>> print(all_milestones(anon_browser)) |
1759 | 107 | Mozilla Firefox 1.0.0 ... | 107 | Mozilla Firefox 1.0.0 ... |
1760 | 108 | 108 | ||
1761 | 109 | 109 | ||
1762 | @@ -123,7 +123,7 @@ the bug and blueprint counts (because they are costly to retrieve). | |||
1763 | 123 | >>> logout() | 123 | >>> logout() |
1764 | 124 | >>> anon_browser.open('http://launchpad.test/gnome') | 124 | >>> anon_browser.open('http://launchpad.test/gnome') |
1765 | 125 | >>> anon_browser.getLink('See all milestones').click() | 125 | >>> anon_browser.getLink('See all milestones').click() |
1767 | 126 | >>> print all_milestones(anon_browser) | 126 | >>> print(all_milestones(anon_browser)) |
1768 | 127 | GNOME 2.1.6 None This is an inactive milestone | 127 | GNOME 2.1.6 None This is an inactive milestone |
1769 | 128 | GNOME 1.0 None This is an inactive milestone | 128 | GNOME 1.0 None This is an inactive milestone |
1770 | 129 | GNOME 1.3 A date This is an inactive milestone | 129 | GNOME 1.3 A date This is an inactive milestone |
1771 | @@ -139,17 +139,17 @@ Pages for the individual milestones show all specifications and bugtasks | |||
1772 | 139 | associated with that milestone for products of this project: | 139 | associated with that milestone for products of this project: |
1773 | 140 | 140 | ||
1774 | 141 | >>> anon_browser.getLink('1.1', index=1).click() | 141 | >>> anon_browser.getLink('1.1', index=1).click() |
1776 | 142 | >>> print anon_browser.title | 142 | >>> print(anon_browser.title) |
1777 | 143 | 1.1 : GNOME | 143 | 1.1 : GNOME |
1778 | 144 | 144 | ||
1779 | 145 | >>> specs = find_tag_by_id(anon_browser.contents, 'milestone_specs') | 145 | >>> specs = find_tag_by_id(anon_browser.contents, 'milestone_specs') |
1781 | 146 | >>> print extract_text(specs) | 146 | >>> print(extract_text(specs)) |
1782 | 147 | Blueprint Project Priority Assignee Delivery | 147 | Blueprint Project Priority Assignee Delivery |
1783 | 148 | Title evolution specification Evolution High Unknown | 148 | Title evolution specification Evolution High Unknown |
1784 | 149 | Title gnomebaker specification gnomebaker High Unknown | 149 | Title gnomebaker specification gnomebaker High Unknown |
1785 | 150 | 150 | ||
1786 | 151 | >>> bugtasks = find_tag_by_id(anon_browser.contents, 'milestone_bugtasks') | 151 | >>> bugtasks = find_tag_by_id(anon_browser.contents, 'milestone_bugtasks') |
1788 | 152 | >>> print extract_text(bugtasks) | 152 | >>> print(extract_text(bugtasks)) |
1789 | 153 | Bug report Project Importance Assignee Status ... | 153 | Bug report Project Importance Assignee Status ... |
1790 | 154 | Milestone test bug for evolution Evolution Undecided Confirmed ... | 154 | Milestone test bug for evolution Evolution Undecided Confirmed ... |
1791 | 155 | Milestone test bug for gnomebaker gnomebaker Undecided Confirmed ... | 155 | Milestone test bug for gnomebaker gnomebaker Undecided Confirmed ... |
1792 | @@ -158,7 +158,7 @@ associated with that milestone for products of this project: | |||
1793 | 158 | A project milestone page has the same navigation as the project: | 158 | A project milestone page has the same navigation as the project: |
1794 | 159 | 159 | ||
1795 | 160 | >>> anon_browser.open('http://launchpad.test/firefox/+milestone/1.0') | 160 | >>> anon_browser.open('http://launchpad.test/firefox/+milestone/1.0') |
1797 | 161 | >>> print anon_browser.title | 161 | >>> print(anon_browser.title) |
1798 | 162 | 1.0 : Mozilla Firefox | 162 | 1.0 : Mozilla Firefox |
1799 | 163 | 163 | ||
1800 | 164 | >>> print_location(anon_browser.contents) | 164 | >>> print_location(anon_browser.contents) |
1801 | @@ -176,7 +176,7 @@ Similarly, a distribution milestone page has the same navigation as the | |||
1802 | 176 | distribution: | 176 | distribution: |
1803 | 177 | 177 | ||
1804 | 178 | >>> anon_browser.open('http://launchpad.test/debian/+milestone/3.1') | 178 | >>> anon_browser.open('http://launchpad.test/debian/+milestone/3.1') |
1806 | 179 | >>> print anon_browser.title | 179 | >>> print(anon_browser.title) |
1807 | 180 | 3.1 : Debian | 180 | 3.1 : Debian |
1808 | 181 | 181 | ||
1809 | 182 | >>> print_location(anon_browser.contents) | 182 | >>> print_location(anon_browser.contents) |
1810 | @@ -251,42 +251,42 @@ Mozilla Firefox product, to complement the existing series "1.0": | |||
1811 | 251 | 251 | ||
1812 | 252 | >>> browser.open('http://launchpad.test/firefox') | 252 | >>> browser.open('http://launchpad.test/firefox') |
1813 | 253 | >>> browser.getLink('Register a series').click() | 253 | >>> browser.getLink('Register a series').click() |
1815 | 254 | >>> print browser.title | 254 | >>> print(browser.title) |
1816 | 255 | Register a new Mozilla Firefox release series... | 255 | Register a new Mozilla Firefox release series... |
1817 | 256 | 256 | ||
1818 | 257 | >>> browser.getControl('Name').value = '2.0' | 257 | >>> browser.getControl('Name').value = '2.0' |
1819 | 258 | >>> browser.getControl('Summary').value = 'The Firefox 2.0 Series' | 258 | >>> browser.getControl('Summary').value = 'The Firefox 2.0 Series' |
1820 | 259 | >>> browser.getControl('Register Series').click() | 259 | >>> browser.getControl('Register Series').click() |
1822 | 260 | >>> print browser.title | 260 | >>> print(browser.title) |
1823 | 261 | Series 2.0 : Mozilla Firefox | 261 | Series 2.0 : Mozilla Firefox |
1824 | 262 | 262 | ||
1825 | 263 | We'll also create a new test milestone within the "trunk" series: | 263 | We'll also create a new test milestone within the "trunk" series: |
1826 | 264 | 264 | ||
1827 | 265 | >>> browser.open('http://launchpad.test/firefox/trunk') | 265 | >>> browser.open('http://launchpad.test/firefox/trunk') |
1829 | 266 | >>> print browser.title | 266 | >>> print(browser.title) |
1830 | 267 | Series trunk : Mozilla Firefox | 267 | Series trunk : Mozilla Firefox |
1831 | 268 | 268 | ||
1832 | 269 | >>> browser.getLink('Create milestone').click() | 269 | >>> browser.getLink('Create milestone').click() |
1834 | 270 | >>> print browser.title | 270 | >>> print(browser.title) |
1835 | 271 | Register a new milestone... | 271 | Register a new milestone... |
1836 | 272 | 272 | ||
1837 | 273 | >>> milestone = 'test-milestone' | 273 | >>> milestone = 'test-milestone' |
1838 | 274 | >>> browser.getControl('Name').value = milestone | 274 | >>> browser.getControl('Name').value = milestone |
1839 | 275 | >>> browser.getControl('Date Targeted').value = '2100-08-08' | 275 | >>> browser.getControl('Date Targeted').value = '2100-08-08' |
1840 | 276 | >>> browser.getControl('Register Milestone').click() | 276 | >>> browser.getControl('Register Milestone').click() |
1842 | 277 | >>> print browser.title | 277 | >>> print(browser.title) |
1843 | 278 | Series trunk : Mozilla Firefox | 278 | Series trunk : Mozilla Firefox |
1844 | 279 | 279 | ||
1845 | 280 | >>> browser.open('http://launchpad.test/firefox/trunk') | 280 | >>> browser.open('http://launchpad.test/firefox/trunk') |
1846 | 281 | 281 | ||
1848 | 282 | >>> print extract_text(find_tag_by_id(browser.contents, 'series-trunk')) | 282 | >>> print(extract_text(find_tag_by_id(browser.contents, 'series-trunk'))) |
1849 | 283 | Version Expected Released Summary | 283 | Version Expected Released Summary |
1850 | 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 ... |
1851 | 285 | Mozilla Firefox... Set date Change details 2004-10-16 ... | 285 | Mozilla Firefox... Set date Change details 2004-10-16 ... |
1852 | 286 | Mozilla Firefox test-milestone 2100-08-08 Release now ... | 286 | Mozilla Firefox test-milestone 2100-08-08 Release now ... |
1853 | 287 | 287 | ||
1854 | 288 | >>> browser.getLink('test-milestone').click() | 288 | >>> browser.getLink('test-milestone').click() |
1856 | 289 | >>> print browser.title | 289 | >>> print(browser.title) |
1857 | 290 | test-milestone : Mozilla Firefox | 290 | test-milestone : Mozilla Firefox |
1858 | 291 | 291 | ||
1859 | 292 | >>> milestone_url = browser.url | 292 | >>> milestone_url = browser.url |
1860 | @@ -295,11 +295,11 @@ Let's target an existing bug to both series "1.0" and series "2.0": | |||
1861 | 295 | 295 | ||
1862 | 296 | >>> from lp.services.helpers import backslashreplace | 296 | >>> from lp.services.helpers import backslashreplace |
1863 | 297 | >>> browser.open(bug_1_url) | 297 | >>> browser.open(bug_1_url) |
1865 | 298 | >>> print backslashreplace(browser.title) | 298 | >>> print(backslashreplace(browser.title)) |
1866 | 299 | Bug #...Test Bug 1... : Bugs : Mozilla Firefox | 299 | Bug #...Test Bug 1... : Bugs : Mozilla Firefox |
1867 | 300 | 300 | ||
1868 | 301 | >>> browser.getLink('Target to series').click() | 301 | >>> browser.getLink('Target to series').click() |
1870 | 302 | >>> print browser.title | 302 | >>> print(browser.title) |
1871 | 303 | Target bug #... to series... | 303 | Target bug #... to series... |
1872 | 304 | 304 | ||
1873 | 305 | >>> browser.getControl('1.0').selected = True | 305 | >>> browser.getControl('1.0').selected = True |
1874 | @@ -308,7 +308,7 @@ Let's target an existing bug to both series "1.0" and series "2.0": | |||
1875 | 308 | 308 | ||
1876 | 309 | The bug page now lists a bug task for each series: | 309 | The bug page now lists a bug task for each series: |
1877 | 310 | 310 | ||
1879 | 311 | >>> print extract_text(first_tag_by_class(browser.contents, 'listing')) | 311 | >>> print(extract_text(first_tag_by_class(browser.contents, 'listing'))) |
1880 | 312 | Affects Status Importance ... | 312 | Affects Status Importance ... |
1881 | 313 | 1.0 ... New Undecided ... | 313 | 1.0 ... New Undecided ... |
1882 | 314 | 2.0 ... New Undecided ... | 314 | 2.0 ... New Undecided ... |
1883 | @@ -332,7 +332,7 @@ milestone: | |||
1884 | 332 | >>> browser.getControl('Importance').value = ['Critical'] | 332 | >>> browser.getControl('Importance').value = ['Critical'] |
1885 | 333 | >>> browser.getControl('Save Changes').click() | 333 | >>> browser.getControl('Save Changes').click() |
1886 | 334 | 334 | ||
1888 | 335 | >>> print extract_text(first_tag_by_class(browser.contents, 'listing')) | 335 | >>> print(extract_text(first_tag_by_class(browser.contents, 'listing'))) |
1889 | 336 | Affects Status Importance ... | 336 | Affects Status Importance ... |
1890 | 337 | 1.0 ... New Critical ... | 337 | 1.0 ... New Critical ... |
1891 | 338 | 338 | ||
1892 | @@ -345,7 +345,7 @@ method. However this time we'll use a different importance: | |||
1893 | 345 | >>> browser.getControl('Importance').value = ['High'] | 345 | >>> browser.getControl('Importance').value = ['High'] |
1894 | 346 | >>> browser.getControl('Save Changes').click() | 346 | >>> browser.getControl('Save Changes').click() |
1895 | 347 | 347 | ||
1897 | 348 | >>> print extract_text(first_tag_by_class(browser.contents, 'listing')) | 348 | >>> print(extract_text(first_tag_by_class(browser.contents, 'listing'))) |
1898 | 349 | Affects Status Importance ... | 349 | Affects Status Importance ... |
1899 | 350 | 2.0 ... New High ... | 350 | 2.0 ... New High ... |
1900 | 351 | 351 | ||
1901 | @@ -354,14 +354,14 @@ listing: | |||
1902 | 354 | 354 | ||
1903 | 355 | >>> browser.open(milestone_url) | 355 | >>> browser.open(milestone_url) |
1904 | 356 | >>> bug_table = find_tag_by_id(browser.contents, 'milestone_bugtasks') | 356 | >>> bug_table = find_tag_by_id(browser.contents, 'milestone_bugtasks') |
1906 | 357 | >>> print extract_text(bug_table ) | 357 | >>> print(extract_text(bug_table )) |
1907 | 358 | Bug report Importance Assignee Status | 358 | Bug report Importance Assignee Status |
1908 | 359 | #... Test Bug 1 Critical New | 359 | #... Test Bug 1 Critical New |
1909 | 360 | #... Test Bug 1 High New | 360 | #... Test Bug 1 High New |
1910 | 361 | 361 | ||
1911 | 362 | Each bugtask has one or more badges. | 362 | Each bugtask has one or more badges. |
1912 | 363 | 363 | ||
1914 | 364 | >>> print bug_table.findAll('tr')[1] | 364 | >>> print(bug_table.findAll('tr')[1]) |
1915 | 365 | <tr>...Test Bug 1...<a...alt="milestone test-milestone"... | 365 | <tr>...Test Bug 1...<a...alt="milestone test-milestone"... |
1916 | 366 | class="sprite milestone"...>... | 366 | class="sprite milestone"...>... |
1917 | 367 | 367 | ||
1918 | @@ -382,8 +382,8 @@ that milestone's bug listing: | |||
1919 | 382 | >>> browser.getControl('Save Changes').click() | 382 | >>> browser.getControl('Save Changes').click() |
1920 | 383 | 383 | ||
1921 | 384 | >>> browser.open(milestone_url) | 384 | >>> browser.open(milestone_url) |
1924 | 385 | >>> print extract_text(find_tag_by_id(browser.contents, | 385 | >>> print(extract_text(find_tag_by_id(browser.contents, |
1925 | 386 | ... 'milestone_bugtasks')) | 386 | ... 'milestone_bugtasks'))) |
1926 | 387 | Bug report... | 387 | Bug report... |
1927 | 388 | Test Bug 2... | 388 | Test Bug 2... |
1928 | 389 | 389 | ||
1929 | @@ -392,25 +392,25 @@ bug still appears in the milestone's bug listing: | |||
1930 | 392 | 392 | ||
1931 | 393 | >>> browser.open(bug_2_url) | 393 | >>> browser.open(bug_2_url) |
1932 | 394 | >>> browser.getLink('Target to series').click() | 394 | >>> browser.getLink('Target to series').click() |
1934 | 395 | >>> print browser.url | 395 | >>> print(browser.url) |
1935 | 396 | http://bugs.launchpad.test/firefox/+bug/.../+nominate | 396 | http://bugs.launchpad.test/firefox/+bug/.../+nominate |
1936 | 397 | 397 | ||
1937 | 398 | >>> browser.getControl('Trunk').selected = True | 398 | >>> browser.getControl('Trunk').selected = True |
1938 | 399 | >>> browser.getControl('Target').click() | 399 | >>> browser.getControl('Target').click() |
1940 | 400 | >>> print extract_text(first_tag_by_class(browser.contents, 'listing')) | 400 | >>> print(extract_text(first_tag_by_class(browser.contents, 'listing'))) |
1941 | 401 | Affects Status ... | 401 | Affects Status ... |
1942 | 402 | Mozilla Firefox ... Status tracked in Trunk ... | 402 | Mozilla Firefox ... Status tracked in Trunk ... |
1943 | 403 | 403 | ||
1944 | 404 | >>> browser.open(milestone_url) | 404 | >>> browser.open(milestone_url) |
1945 | 405 | >>> bugtasks = extract_text(find_tag_by_id(browser.contents, | 405 | >>> bugtasks = extract_text(find_tag_by_id(browser.contents, |
1946 | 406 | ... 'milestone_bugtasks')) | 406 | ... 'milestone_bugtasks')) |
1948 | 407 | >>> print bugtasks | 407 | >>> print(bugtasks) |
1949 | 408 | Bug report... | 408 | Bug report... |
1950 | 409 | Test Bug 2... | 409 | Test Bug 2... |
1951 | 410 | 410 | ||
1952 | 411 | Moreover, the bug appears only once in the listing: | 411 | Moreover, the bug appears only once in the listing: |
1953 | 412 | 412 | ||
1955 | 413 | >>> print bugtasks.count('Test Bug 2') | 413 | >>> print(bugtasks.count('Test Bug 2')) |
1956 | 414 | 1 | 414 | 1 |
1957 | 415 | 415 | ||
1958 | 416 | 416 | ||
1959 | 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 | |||
1960 | index 70b52f8..d1a8eb1 100644 | |||
1961 | --- a/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt | |||
1962 | +++ b/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt | |||
1963 | @@ -26,8 +26,8 @@ redirect to the Ubuntu Hoary page showing the milestone we added. | |||
1964 | 26 | >>> name12_browser.getControl('Register Milestone').click() | 26 | >>> name12_browser.getControl('Register Milestone').click() |
1965 | 27 | >>> name12_browser.url | 27 | >>> name12_browser.url |
1966 | 28 | 'http://launchpad.test/ubuntu/hoary' | 28 | 'http://launchpad.test/ubuntu/hoary' |
1969 | 29 | >>> print extract_text( | 29 | >>> print(extract_text( |
1970 | 30 | ... find_tag_by_id(name12_browser.contents, 'series-hoary')) | 30 | ... find_tag_by_id(name12_browser.contents, 'series-hoary'))) |
1971 | 31 | Version ... | 31 | Version ... |
1972 | 32 | sounder01 ... | 32 | sounder01 ... |
1973 | 33 | 33 | ||
1974 | 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 | |||
1975 | index a6159c8..2a229aa 100644 | |||
1976 | --- a/lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt | |||
1977 | +++ b/lib/lp/registry/stories/milestone/xx-milestone-add-and-edit.txt | |||
1978 | @@ -70,9 +70,9 @@ can create structural bug subscriptions. | |||
1979 | 70 | 70 | ||
1980 | 71 | >>> user_browser.open('http://launchpad.test/firefox/+milestone/1.0') | 71 | >>> user_browser.open('http://launchpad.test/firefox/+milestone/1.0') |
1981 | 72 | >>> user_browser.getLink('Subscribe to bug mail').click() | 72 | >>> user_browser.getLink('Subscribe to bug mail').click() |
1983 | 73 | >>> print user_browser.url | 73 | >>> print(user_browser.url) |
1984 | 74 | http://launchpad.test/firefox/+milestone/1.0/+subscribe | 74 | http://launchpad.test/firefox/+milestone/1.0/+subscribe |
1986 | 75 | >>> print user_browser.title | 75 | >>> print(user_browser.title) |
1987 | 76 | Subscribe : 1.0 : Bugs : Mozilla Firefox | 76 | Subscribe : 1.0 : Bugs : Mozilla Firefox |
1988 | 77 | 77 | ||
1989 | 78 | But we can't subscribe to project milestones, since they are not real objects. | 78 | But we can't subscribe to project milestones, since they are not real objects. |
1990 | @@ -91,10 +91,10 @@ the series. | |||
1991 | 91 | 91 | ||
1992 | 92 | >>> driver_browser = setupBrowser(auth='Basic test@canonical.com:test') | 92 | >>> driver_browser = setupBrowser(auth='Basic test@canonical.com:test') |
1993 | 93 | >>> driver_browser.open('http://launchpad.test/firefox/trunk') | 93 | >>> driver_browser.open('http://launchpad.test/firefox/trunk') |
1995 | 94 | >>> print driver_browser.title | 94 | >>> print(driver_browser.title) |
1996 | 95 | Series trunk : Mozilla Firefox | 95 | Series trunk : Mozilla Firefox |
1999 | 96 | >>> print extract_text(find_tag_by_id( | 96 | >>> print(extract_text(find_tag_by_id( |
2000 | 97 | ... driver_browser.contents, 'series-trunk')) | 97 | ... driver_browser.contents, 'series-trunk'))) |
2001 | 98 | Version Expected Released Summary | 98 | Version Expected Released Summary |
2002 | 99 | Mozilla Firefox 0.9.2... Set date Change details 2004-10-16 | 99 | Mozilla Firefox 0.9.2... Set date Change details 2004-10-16 |
2003 | 100 | ... | 100 | ... |
2004 | @@ -109,17 +109,17 @@ A user with launchpad.Edit rights for a release can see the delete link and | |||
2005 | 109 | access the delete page. Sample Person is the driver so they have those rights. | 109 | access the delete page. Sample Person is the driver so they have those rights. |
2006 | 110 | 110 | ||
2007 | 111 | >>> driver_browser.getLink('0.9.2').click() | 111 | >>> driver_browser.getLink('0.9.2').click() |
2009 | 112 | >>> print driver_browser.title | 112 | >>> print(driver_browser.title) |
2010 | 113 | 0.9.2 "One (secure) Tree Hill" : Mozilla Firefox | 113 | 0.9.2 "One (secure) Tree Hill" : Mozilla Firefox |
2011 | 114 | 114 | ||
2012 | 115 | >>> driver_browser.getLink('Delete milestone').click() | 115 | >>> driver_browser.getLink('Delete milestone').click() |
2014 | 116 | >>> print driver_browser.title | 116 | >>> print(driver_browser.title) |
2015 | 117 | Delete Mozilla Firefox 0.9.2... | 117 | Delete Mozilla Firefox 0.9.2... |
2016 | 118 | 118 | ||
2017 | 119 | The 0.9.2 release has a release and files associated with it. Sample | 119 | The 0.9.2 release has a release and files associated with it. Sample |
2018 | 120 | Person reads that they will be deleted too. | 120 | Person reads that they will be deleted too. |
2019 | 121 | 121 | ||
2021 | 122 | >>> print extract_text(find_main_content(driver_browser.contents)) | 122 | >>> print(extract_text(find_main_content(driver_browser.contents))) |
2022 | 123 | Delete Mozilla Firefox 0.9.2 "One (secure) Tree Hill" | 123 | Delete Mozilla Firefox 0.9.2 "One (secure) Tree Hill" |
2023 | 124 | ... | 124 | ... |
2024 | 125 | The associated 0.9.2 release "One (secure) Tree Hill" and its files | 125 | The associated 0.9.2 release "One (secure) Tree Hill" and its files |
2025 | @@ -130,13 +130,13 @@ Sample Person chooses the delete button, then reads that the action is | |||
2026 | 130 | successful. | 130 | successful. |
2027 | 131 | 131 | ||
2028 | 132 | >>> driver_browser.getControl('Delete Milestone').click() | 132 | >>> driver_browser.getControl('Delete Milestone').click() |
2030 | 133 | >>> print driver_browser.title | 133 | >>> print(driver_browser.title) |
2031 | 134 | Series trunk : Mozilla Firefox | 134 | Series trunk : Mozilla Firefox |
2032 | 135 | 135 | ||
2033 | 136 | >>> print_feedback_messages(driver_browser.contents) | 136 | >>> print_feedback_messages(driver_browser.contents) |
2034 | 137 | Milestone 0.9.2 deleted. | 137 | Milestone 0.9.2 deleted. |
2037 | 138 | >>> print extract_text(find_tag_by_id( | 138 | >>> print(extract_text(find_tag_by_id( |
2038 | 139 | ... driver_browser.contents, 'series-trunk')) | 139 | ... driver_browser.contents, 'series-trunk'))) |
2039 | 140 | Version Expected Released Summary | 140 | Version Expected Released Summary |
2040 | 141 | Mozilla Firefox 0.9.1 ... | 141 | Mozilla Firefox 0.9.1 ... |
2041 | 142 | Mozilla Firefox 0.9 ... | 142 | Mozilla Firefox 0.9 ... |
2042 | diff --git a/lib/lp/registry/stories/milestone/xx-milestone-description.txt b/lib/lp/registry/stories/milestone/xx-milestone-description.txt | |||
2043 | index 27db913..d131f2b 100644 | |||
2044 | --- a/lib/lp/registry/stories/milestone/xx-milestone-description.txt | |||
2045 | +++ b/lib/lp/registry/stories/milestone/xx-milestone-description.txt | |||
2046 | @@ -28,7 +28,7 @@ The summary appears on the milestone index page. | |||
2047 | 28 | 28 | ||
2048 | 29 | >>> test_browser.open('http://launchpad.test/ubuntu/+milestone/milestone1') | 29 | >>> test_browser.open('http://launchpad.test/ubuntu/+milestone/milestone1') |
2049 | 30 | >>> tag = find_tag_by_id(test_browser.contents, 'description') | 30 | >>> tag = find_tag_by_id(test_browser.contents, 'description') |
2051 | 31 | >>> print extract_text(tag) | 31 | >>> print(extract_text(tag)) |
2052 | 32 | Summary of first Ubuntu milestone. | 32 | Summary of first Ubuntu milestone. |
2053 | 33 | 33 | ||
2054 | 34 | We can edit the summary after creating the milestone. | 34 | We can edit the summary after creating the milestone. |
2055 | @@ -43,7 +43,7 @@ And see that it is indeed modified on the milestone page. | |||
2056 | 43 | 43 | ||
2057 | 44 | >>> test_browser.open('http://launchpad.test/ubuntu/+milestone/milestone1') | 44 | >>> test_browser.open('http://launchpad.test/ubuntu/+milestone/milestone1') |
2058 | 45 | >>> tag = find_tag_by_id(test_browser.contents, 'description') | 45 | >>> tag = find_tag_by_id(test_browser.contents, 'description') |
2060 | 46 | >>> print extract_text(tag) | 46 | >>> print(extract_text(tag)) |
2061 | 47 | Modified summary of first Ubuntu milestone. | 47 | Modified summary of first Ubuntu milestone. |
2062 | 48 | 48 | ||
2063 | 49 | 49 | ||
2064 | @@ -63,7 +63,7 @@ The summary appears on the milestone index page. | |||
2065 | 63 | >>> test_browser.open( | 63 | >>> test_browser.open( |
2066 | 64 | ... 'http://launchpad.test/alsa-utils/+milestone/milestone1') | 64 | ... 'http://launchpad.test/alsa-utils/+milestone/milestone1') |
2067 | 65 | >>> tag = find_tag_by_id(test_browser.contents, 'description') | 65 | >>> tag = find_tag_by_id(test_browser.contents, 'description') |
2069 | 66 | >>> print extract_text(tag) | 66 | >>> print(extract_text(tag)) |
2070 | 67 | Summary of first alsa-utils milestone. | 67 | Summary of first alsa-utils milestone. |
2071 | 68 | 68 | ||
2072 | 69 | We can edit the summary after creating the milestone. | 69 | We can edit the summary after creating the milestone. |
2073 | @@ -79,5 +79,5 @@ And see that it is indeed modified on the milestone page. | |||
2074 | 79 | >>> test_browser.open( | 79 | >>> test_browser.open( |
2075 | 80 | ... 'http://launchpad.test/alsa-utils/+milestone/milestone1') | 80 | ... 'http://launchpad.test/alsa-utils/+milestone/milestone1') |
2076 | 81 | >>> tag = find_tag_by_id(test_browser.contents, 'description') | 81 | >>> tag = find_tag_by_id(test_browser.contents, 'description') |
2078 | 82 | >>> print extract_text(tag) | 82 | >>> print(extract_text(tag)) |
2079 | 83 | Modified summary of first alsa-utils milestone. | 83 | Modified summary of first alsa-utils milestone. |
2080 | diff --git a/lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt b/lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt | |||
2081 | index cacfde8..1e99a5e 100644 | |||
2082 | --- a/lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt | |||
2083 | +++ b/lib/lp/registry/stories/object/xx-karmacontext-topcontributors.txt | |||
2084 | @@ -19,7 +19,7 @@ The top contributors page can be reached from the top contributors portlet. | |||
2085 | 19 | True | 19 | True |
2086 | 20 | 20 | ||
2087 | 21 | >>> anon_browser.getLink('More contributors').click() | 21 | >>> anon_browser.getLink('More contributors').click() |
2089 | 22 | >>> print anon_browser.title | 22 | >>> print(anon_browser.title) |
2090 | 23 | Top Ubuntu Contributors... | 23 | Top Ubuntu Contributors... |
2091 | 24 | 24 | ||
2092 | 25 | 25 | ||
2093 | @@ -34,7 +34,7 @@ The top contributors page can be reached from the top contributors portlet. | |||
2094 | 34 | True | 34 | True |
2095 | 35 | 35 | ||
2096 | 36 | >>> anon_browser.getLink('More contributors').click() | 36 | >>> anon_browser.getLink('More contributors').click() |
2098 | 37 | >>> print anon_browser.title | 37 | >>> print(anon_browser.title) |
2099 | 38 | Top Mozilla Firefox Contributors... | 38 | Top Mozilla Firefox Contributors... |
2100 | 39 | 39 | ||
2101 | 40 | 40 | ||
2102 | @@ -49,5 +49,5 @@ The top contributors page can be reached from the top contributors portlet. | |||
2103 | 49 | True | 49 | True |
2104 | 50 | 50 | ||
2105 | 51 | >>> anon_browser.getLink('More contributors').click() | 51 | >>> anon_browser.getLink('More contributors').click() |
2107 | 52 | >>> print anon_browser.title | 52 | >>> print(anon_browser.title) |
2108 | 53 | Top The Mozilla Project Contributors... | 53 | Top The Mozilla Project Contributors... |
2109 | 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 | |||
2110 | index 746dcc6..dcccb46 100644 | |||
2111 | --- a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt | |||
2112 | +++ b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging-concurrent-deletion.txt | |||
2113 | @@ -22,9 +22,9 @@ deletion succeeds and the usual informational message is displayed. | |||
2114 | 22 | >>> first_browser.getControl('Unlink').click() | 22 | >>> first_browser.getControl('Unlink').click() |
2115 | 23 | >>> content = first_browser.contents | 23 | >>> content = first_browser.contents |
2116 | 24 | >>> for tag in find_tags_by_class(content, 'error'): | 24 | >>> for tag in find_tags_by_class(content, 'error'): |
2118 | 25 | ... print extract_text(tag) | 25 | ... print(extract_text(tag)) |
2119 | 26 | >>> for tag in find_tags_by_class(content, 'informational'): | 26 | >>> for tag in find_tags_by_class(content, 'informational'): |
2121 | 27 | ... print extract_text(tag) | 27 | ... print(extract_text(tag)) |
2122 | 28 | Removed upstream association between alsa-utils trunk series and Warty. | 28 | Removed upstream association between alsa-utils trunk series and Warty. |
2123 | 29 | 29 | ||
2124 | 30 | A few minutes later, the user sees the same packaging association in the | 30 | A few minutes later, the user sees the same packaging association in the |
2125 | @@ -37,7 +37,7 @@ succeed. | |||
2126 | 37 | ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging').click() | 37 | ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging').click() |
2127 | 38 | >>> content = second_browser.contents | 38 | >>> content = second_browser.contents |
2128 | 39 | >>> for tag in find_tags_by_class(content, 'informational'): | 39 | >>> for tag in find_tags_by_class(content, 'informational'): |
2130 | 40 | ... print extract_text(tag) | 40 | ... print(extract_text(tag)) |
2131 | 41 | >>> for tag in find_tags_by_class(content, 'error'): | 41 | >>> for tag in find_tags_by_class(content, 'error'): |
2133 | 42 | ... print extract_text(tag) | 42 | ... print(extract_text(tag)) |
2134 | 43 | This upstream association was deleted already. | 43 | This upstream association was deleted already. |
2135 | diff --git a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt | |||
2136 | index ca22f47..a1f0e86 100644 | |||
2137 | --- a/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt | |||
2138 | +++ b/lib/lp/registry/stories/packaging/xx-distributionsourcepackage-packaging.txt | |||
2139 | @@ -8,7 +8,7 @@ Any user can see the summary of the binaries built from the current version | |||
2140 | 8 | of the package. | 8 | of the package. |
2141 | 9 | 9 | ||
2142 | 10 | >>> anon_browser.open('http://launchpad.test/ubuntu/+source/pmount') | 10 | >>> anon_browser.open('http://launchpad.test/ubuntu/+source/pmount') |
2144 | 11 | >>> print extract_text(find_tag_by_id(anon_browser.contents, 'summary')) | 11 | >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'summary'))) |
2145 | 12 | pmount: pmount shortdesc | 12 | pmount: pmount shortdesc |
2146 | 13 | 13 | ||
2147 | 14 | This page includes a table that lists all the releases of this source | 14 | This page includes a table that lists all the releases of this source |
2148 | @@ -17,7 +17,7 @@ source package in each series of this distribution. | |||
2149 | 17 | 17 | ||
2150 | 18 | >>> anon_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils') | 18 | >>> anon_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils') |
2151 | 19 | >>> content = anon_browser.contents | 19 | >>> content = anon_browser.contents |
2153 | 20 | >>> print extract_text(find_tag_by_id(content, 'packages_list')) | 20 | >>> print(extract_text(find_tag_by_id(content, 'packages_list'))) |
2154 | 21 | The Hoary Hedgehog Release (active development) Set upstream link | 21 | The Hoary Hedgehog Release (active development) Set upstream link |
2155 | 22 | 1.0.9a-4ubuntu1 release (main) 2005-09-15 | 22 | 1.0.9a-4ubuntu1 release (main) 2005-09-15 |
2156 | 23 | The Warty Warthog Release (current stable release) alsa-utils trunk series | 23 | The Warty Warthog Release (current stable release) alsa-utils trunk series |
2157 | @@ -35,7 +35,7 @@ packaging links. | |||
2158 | 35 | >>> user_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils') | 35 | >>> user_browser.open('http://launchpad.test/ubuntu/+source/alsa-utils') |
2159 | 36 | >>> link = user_browser.getLink( | 36 | >>> link = user_browser.getLink( |
2160 | 37 | ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging') | 37 | ... url='/ubuntu/warty/+source/alsa-utils/+remove-packaging') |
2162 | 38 | >>> print link | 38 | >>> print(link) |
2163 | 39 | <Link text='Remove upstream link'... | 39 | <Link text='Remove upstream link'... |
2164 | 40 | 40 | ||
2165 | 41 | This button is not displayed to anonymous users. | 41 | This button is not displayed to anonymous users. |
2166 | @@ -54,11 +54,11 @@ Clicking this button deletes the corresponding packaging association. | |||
2167 | 54 | >>> user_browser.getControl('Unlink').click() | 54 | >>> user_browser.getControl('Unlink').click() |
2168 | 55 | >>> content = user_browser.contents | 55 | >>> content = user_browser.contents |
2169 | 56 | >>> for tag in find_tags_by_class(content, 'error'): | 56 | >>> for tag in find_tags_by_class(content, 'error'): |
2171 | 57 | ... print extract_text(tag) | 57 | ... print(extract_text(tag)) |
2172 | 58 | >>> for tag in find_tags_by_class(content, 'informational'): | 58 | >>> for tag in find_tags_by_class(content, 'informational'): |
2174 | 59 | ... print extract_text(tag) | 59 | ... print(extract_text(tag)) |
2175 | 60 | Removed upstream association between alsa-utils trunk series and Warty. | 60 | Removed upstream association between alsa-utils trunk series and Warty. |
2177 | 61 | >>> print extract_text(find_tag_by_id(content, 'packages_list')) | 61 | >>> print(extract_text(find_tag_by_id(content, 'packages_list'))) |
2178 | 62 | The Hoary Hedgehog Release (active development) Set upstream link | 62 | The Hoary Hedgehog Release (active development) Set upstream link |
2179 | 63 | 1.0.9a-4ubuntu1 release (main) 2005-09-15 | 63 | 1.0.9a-4ubuntu1 release (main) 2005-09-15 |
2180 | 64 | The Warty Warthog Release (current stable release) Set upstream link | 64 | The Warty Warthog Release (current stable release) Set upstream link |
2181 | diff --git a/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt b/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt | |||
2182 | index 7f33abc..0457b89 100644 | |||
2183 | --- a/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt | |||
2184 | +++ b/lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt | |||
2185 | @@ -15,7 +15,7 @@ and sees that pmount is not linked. | |||
2186 | 15 | 15 | ||
2187 | 16 | >>> user_browser.open( | 16 | >>> user_browser.open( |
2188 | 17 | ... 'http://launchpad.test/ubuntu/hoary/+needs-packaging') | 17 | ... 'http://launchpad.test/ubuntu/hoary/+needs-packaging') |
2190 | 18 | >>> print extract_text(find_tag_by_id(user_browser.contents, 'packages')) | 18 | >>> print(extract_text(find_tag_by_id(user_browser.contents, 'packages'))) |
2191 | 19 | Source Package Bugs Translations | 19 | Source Package Bugs Translations |
2192 | 20 | pmount No bugs 64 strings ... | 20 | pmount No bugs 64 strings ... |
2193 | 21 | 21 | ||
2194 | @@ -23,8 +23,8 @@ They look at the pmount source package page in Hoary and read that the | |||
2195 | 23 | upstream project is not set. | 23 | upstream project is not set. |
2196 | 24 | 24 | ||
2197 | 25 | >>> user_browser.getLink('pmount').click() | 25 | >>> user_browser.getLink('pmount').click() |
2200 | 26 | >>> print extract_text(find_tag_by_id( | 26 | >>> print(extract_text(find_tag_by_id( |
2201 | 27 | ... user_browser.contents, 'no-upstreams')) | 27 | ... user_browser.contents, 'no-upstreams'))) |
2202 | 28 | Launchpad... | 28 | Launchpad... |
2203 | 29 | There are no projects registered in Launchpad that are a potential | 29 | There are no projects registered in Launchpad that are a potential |
2204 | 30 | match for this source package. Can you help us find one? | 30 | match for this source package. Can you help us find one? |
2205 | @@ -42,16 +42,16 @@ project. They set the upstream packaging link and see that it is set. | |||
2206 | 42 | >>> user_browser.getControl('Continue').click() | 42 | >>> user_browser.getControl('Continue').click() |
2207 | 43 | >>> user_browser.getControl(name='field.productseries').value = ['trunk'] | 43 | >>> user_browser.getControl(name='field.productseries').value = ['trunk'] |
2208 | 44 | >>> user_browser.getControl("Change").click() | 44 | >>> user_browser.getControl("Change").click() |
2211 | 45 | >>> print extract_text(find_tag_by_id( | 45 | >>> print(extract_text(find_tag_by_id( |
2212 | 46 | ... user_browser.contents, 'upstreams')) | 46 | ... user_browser.contents, 'upstreams'))) |
2213 | 47 | The Mozilla Project...Mozilla Thunderbird...trunk... | 47 | The Mozilla Project...Mozilla Thunderbird...trunk... |
2214 | 48 | 48 | ||
2215 | 49 | They see the "Show upstream links" link and take a look at the project's | 49 | They see the "Show upstream links" link and take a look at the project's |
2216 | 50 | packaging in distributions. | 50 | packaging in distributions. |
2217 | 51 | 51 | ||
2218 | 52 | >>> user_browser.getLink('Show upstream links').click() | 52 | >>> user_browser.getLink('Show upstream links').click() |
2221 | 53 | >>> print extract_text( | 53 | >>> print(extract_text( |
2222 | 54 | ... find_tag_by_id(user_browser.contents, 'distribution-series')) | 54 | ... find_tag_by_id(user_browser.contents, 'distribution-series'))) |
2223 | 55 | Distribution series Source package Version Project series | 55 | Distribution series Source package Version Project series |
2224 | 56 | Hoary (5.04) pmount 0.1-2 Mozilla Thunderbird trunk... | 56 | Hoary (5.04) pmount 0.1-2 Mozilla Thunderbird trunk... |
2225 | 57 | 57 | ||
2226 | @@ -61,8 +61,8 @@ link to all versions and follows it to the distro source package page. | |||
2227 | 61 | >>> user_browser.getLink('pmount').click() | 61 | >>> user_browser.getLink('pmount').click() |
2228 | 62 | >>> user_browser.getLink( | 62 | >>> user_browser.getLink( |
2229 | 63 | ... 'All versions of pmount source in Ubuntu').click() | 63 | ... 'All versions of pmount source in Ubuntu').click() |
2232 | 64 | >>> print extract_text(find_tag_by_id( | 64 | >>> print(extract_text(find_tag_by_id( |
2233 | 65 | ... user_browser.contents, 'packages_list')) | 65 | ... user_browser.contents, 'packages_list'))) |
2234 | 66 | The Hoary Hedgehog Release (active development) ... | 66 | The Hoary Hedgehog Release (active development) ... |
2235 | 67 | 0.1-2 release (main) 2005-08-24 | 67 | 0.1-2 release (main) 2005-08-24 |
2236 | 68 | 68 | ||
2237 | @@ -79,15 +79,15 @@ step of the multistep form. | |||
2238 | 79 | >>> user_browser.getControl( | 79 | >>> user_browser.getControl( |
2239 | 80 | ... 'Register the upstream project').selected = True | 80 | ... 'Register the upstream project').selected = True |
2240 | 81 | >>> user_browser.getControl("Link to Upstream Project").click() | 81 | >>> user_browser.getControl("Link to Upstream Project").click() |
2242 | 82 | >>> print user_browser.getControl(name='field.name').value | 82 | >>> print(user_browser.getControl(name='field.name').value) |
2243 | 83 | bonkers | 83 | bonkers |
2245 | 84 | >>> print user_browser.getControl(name='field.display_name').value | 84 | >>> print(user_browser.getControl(name='field.display_name').value) |
2246 | 85 | Bonkers | 85 | Bonkers |
2248 | 86 | >>> print user_browser.getControl(name='field.summary').value | 86 | >>> print(user_browser.getControl(name='field.summary').value) |
2249 | 87 | summary for flubber-bin | 87 | summary for flubber-bin |
2250 | 88 | summary for flubber-lib | 88 | summary for flubber-lib |
2253 | 89 | >>> print extract_text( | 89 | >>> print(extract_text( |
2254 | 90 | ... find_tag_by_id(user_browser.contents, 'step-title')) | 90 | ... find_tag_by_id(user_browser.contents, 'step-title'))) |
2255 | 91 | Step 2 (of 2): Check for duplicate projects | 91 | Step 2 (of 2): Check for duplicate projects |
2256 | 92 | 92 | ||
2257 | 93 | When No Privileges Person selects "Choose another upstream project" and | 93 | When No Privileges Person selects "Choose another upstream project" and |
2258 | @@ -99,19 +99,19 @@ then finds out that the project doesn't exist, they use the | |||
2259 | 99 | >>> user_browser.getControl( | 99 | >>> user_browser.getControl( |
2260 | 100 | ... 'Choose another upstream project').selected = True | 100 | ... 'Choose another upstream project').selected = True |
2261 | 101 | >>> user_browser.getControl("Link to Upstream Project").click() | 101 | >>> user_browser.getControl("Link to Upstream Project").click() |
2263 | 102 | >>> print user_browser.url | 102 | >>> print(user_browser.url) |
2264 | 103 | http://launchpad.test/youbuntu/busy/+source/bonkers/+edit-packaging | 103 | http://launchpad.test/youbuntu/busy/+source/bonkers/+edit-packaging |
2265 | 104 | 104 | ||
2266 | 105 | >>> user_browser.getLink("Register the upstream project").click() | 105 | >>> user_browser.getLink("Register the upstream project").click() |
2268 | 106 | >>> print user_browser.getControl(name='field.name').value | 106 | >>> print(user_browser.getControl(name='field.name').value) |
2269 | 107 | bonkers | 107 | bonkers |
2271 | 108 | >>> print user_browser.getControl(name='field.display_name').value | 108 | >>> print(user_browser.getControl(name='field.display_name').value) |
2272 | 109 | Bonkers | 109 | Bonkers |
2274 | 110 | >>> print user_browser.getControl(name='field.summary').value | 110 | >>> print(user_browser.getControl(name='field.summary').value) |
2275 | 111 | summary for flubber-bin | 111 | summary for flubber-bin |
2276 | 112 | summary for flubber-lib | 112 | summary for flubber-lib |
2279 | 113 | >>> print extract_text( | 113 | >>> print(extract_text( |
2280 | 114 | ... find_tag_by_id(user_browser.contents, 'step-title')) | 114 | ... find_tag_by_id(user_browser.contents, 'step-title'))) |
2281 | 115 | Step 2 (of 2): Check for duplicate projects | 115 | Step 2 (of 2): Check for duplicate projects |
2282 | 116 | 116 | ||
2283 | 117 | After No Privileges Person selects the licences, the user is redirected back | 117 | After No Privileges Person selects the licences, the user is redirected back |
2284 | @@ -120,14 +120,14 @@ to the source package page and an informational message will be displayed. | |||
2285 | 120 | >>> user_browser.getControl(name='field.licenses').value = ['BSD'] | 120 | >>> user_browser.getControl(name='field.licenses').value = ['BSD'] |
2286 | 121 | >>> user_browser.getControl( | 121 | >>> user_browser.getControl( |
2287 | 122 | ... "Complete registration and link to bonkers package").click() | 122 | ... "Complete registration and link to bonkers package").click() |
2289 | 123 | >>> print user_browser.url | 123 | >>> print(user_browser.url) |
2290 | 124 | http://launchpad.test/youbuntu/busy/+source/bonkers | 124 | http://launchpad.test/youbuntu/busy/+source/bonkers |
2291 | 125 | >>> for tag in find_tags_by_class( | 125 | >>> for tag in find_tags_by_class( |
2292 | 126 | ... user_browser.contents, 'informational message'): | 126 | ... user_browser.contents, 'informational message'): |
2294 | 127 | ... print extract_text(tag) | 127 | ... print(extract_text(tag)) |
2295 | 128 | Linked Bonkers project to bonkers source package. | 128 | Linked Bonkers project to bonkers source package. |
2298 | 129 | >>> print extract_text( | 129 | >>> print(extract_text( |
2299 | 130 | ... find_tag_by_id(user_browser.contents, 'upstreams')) | 130 | ... find_tag_by_id(user_browser.contents, 'upstreams'))) |
2300 | 131 | Bonkers ā trunk | 131 | Bonkers ā trunk |
2301 | 132 | Change upstream link | 132 | Change upstream link |
2302 | 133 | Remove upstream link... | 133 | Remove upstream link... |
2303 | diff --git a/lib/lp/registry/stories/person/xx-add-sshkey.txt b/lib/lp/registry/stories/person/xx-add-sshkey.txt | |||
2304 | index f3d42bc..47e4140 100644 | |||
2305 | --- a/lib/lp/registry/stories/person/xx-add-sshkey.txt | |||
2306 | +++ b/lib/lp/registry/stories/person/xx-add-sshkey.txt | |||
2307 | @@ -11,19 +11,19 @@ Profile page | |||
2308 | 11 | User keys are shown on profile pages, and any user can see that. | 11 | User keys are shown on profile pages, and any user can see that. |
2309 | 12 | 12 | ||
2310 | 13 | >>> anon_browser.open('http://launchpad.test/~name12') | 13 | >>> anon_browser.open('http://launchpad.test/~name12') |
2312 | 14 | >>> print anon_browser.title | 14 | >>> print(anon_browser.title) |
2313 | 15 | Sample Person in Launchpad | 15 | Sample Person in Launchpad |
2316 | 16 | >>> print extract_text( | 16 | >>> print(extract_text( |
2317 | 17 | ... find_tag_by_id(anon_browser.contents, 'sshkeys')) | 17 | ... find_tag_by_id(anon_browser.contents, 'sshkeys'))) |
2318 | 18 | SSH keys: andrew@trogdor | 18 | SSH keys: andrew@trogdor |
2319 | 19 | 19 | ||
2320 | 20 | Salgado does not have a key, so we omit the 'SSH keys' section for anonymous | 20 | Salgado does not have a key, so we omit the 'SSH keys' section for anonymous |
2321 | 21 | users. | 21 | users. |
2322 | 22 | 22 | ||
2323 | 23 | >>> anon_browser.open('http://launchpad.test/~salgado') | 23 | >>> anon_browser.open('http://launchpad.test/~salgado') |
2325 | 24 | >>> print anon_browser.title | 24 | >>> print(anon_browser.title) |
2326 | 25 | Guilherme Salgado in Launchpad | 25 | Guilherme Salgado in Launchpad |
2328 | 26 | >>> print find_tag_by_id(anon_browser.contents, 'sshkeys') | 26 | >>> print(find_tag_by_id(anon_browser.contents, 'sshkeys')) |
2329 | 27 | None | 27 | None |
2330 | 28 | 28 | ||
2331 | 29 | Salgado sees a message explaining that he can register his ssh key. | 29 | Salgado sees a message explaining that he can register his ssh key. |
2332 | @@ -37,10 +37,10 @@ Salgado sees a message explaining that he can register his ssh key. | |||
2333 | 37 | >>> logout() | 37 | >>> logout() |
2334 | 38 | >>> browser = setupBrowserFreshLogin(salgado) | 38 | >>> browser = setupBrowserFreshLogin(salgado) |
2335 | 39 | >>> browser.open('http://launchpad.test/~salgado') | 39 | >>> browser.open('http://launchpad.test/~salgado') |
2337 | 40 | >>> print browser.title | 40 | >>> print(browser.title) |
2338 | 41 | Guilherme Salgado in Launchpad | 41 | Guilherme Salgado in Launchpad |
2341 | 42 | >>> print extract_text( | 42 | >>> print(extract_text( |
2342 | 43 | ... find_tag_by_id(browser.contents, 'sshkeys')) | 43 | ... find_tag_by_id(browser.contents, 'sshkeys'))) |
2343 | 44 | SSH keys: Add an SSH key | 44 | SSH keys: Add an SSH key |
2344 | 45 | No SSH keys registered. | 45 | No SSH keys registered. |
2345 | 46 | 46 | ||
2346 | @@ -53,7 +53,7 @@ an already uploaded one. Salgado sees a link on his profile page to update | |||
2347 | 53 | his SSH keys. The page allows him to add a key. | 53 | his SSH keys. The page allows him to add a key. |
2348 | 54 | 54 | ||
2349 | 55 | >>> browser.getLink('Add an SSH key').click() | 55 | >>> browser.getLink('Add an SSH key').click() |
2351 | 56 | >>> print browser.title | 56 | >>> print(browser.title) |
2352 | 57 | Change your SSH keys... | 57 | Change your SSH keys... |
2353 | 58 | 58 | ||
2354 | 59 | Any key must be of the form "keytype keytext comment", where keytype must be | 59 | Any key must be of the form "keytype keytext comment", where keytype must be |
2355 | @@ -65,21 +65,21 @@ message will be shown. | |||
2356 | 65 | >>> browser.getControl(name='sshkey').value = sshkey | 65 | >>> browser.getControl(name='sshkey').value = sshkey |
2357 | 66 | >>> browser.getControl('Import Public Key').click() | 66 | >>> browser.getControl('Import Public Key').click() |
2358 | 67 | >>> for tag in find_main_content(browser.contents)('p', 'error message'): | 67 | >>> for tag in find_main_content(browser.contents)('p', 'error message'): |
2360 | 68 | ... print tag.renderContents() | 68 | ... print(tag.renderContents()) |
2361 | 69 | Invalid public key | 69 | Invalid public key |
2362 | 70 | 70 | ||
2363 | 71 | >>> sshkey = "ssh-rsa foo" | 71 | >>> sshkey = "ssh-rsa foo" |
2364 | 72 | >>> browser.getControl(name='sshkey').value = sshkey | 72 | >>> browser.getControl(name='sshkey').value = sshkey |
2365 | 73 | >>> browser.getControl('Import Public Key').click() | 73 | >>> browser.getControl('Import Public Key').click() |
2366 | 74 | >>> for tag in find_main_content(browser.contents)('p', 'error message'): | 74 | >>> for tag in find_main_content(browser.contents)('p', 'error message'): |
2368 | 75 | ... print tag.renderContents() | 75 | ... print(tag.renderContents()) |
2369 | 76 | Invalid public key | 76 | Invalid public key |
2370 | 77 | 77 | ||
2371 | 78 | >>> sshkey = "ssh-xsa foo comment" | 78 | >>> sshkey = "ssh-xsa foo comment" |
2372 | 79 | >>> browser.getControl(name='sshkey').value = sshkey | 79 | >>> browser.getControl(name='sshkey').value = sshkey |
2373 | 80 | >>> browser.getControl('Import Public Key').click() | 80 | >>> browser.getControl('Import Public Key').click() |
2374 | 81 | >>> for tag in find_main_content(browser.contents)('p', 'error message'): | 81 | >>> for tag in find_main_content(browser.contents)('p', 'error message'): |
2376 | 82 | ... print tag.renderContents() | 82 | ... print(tag.renderContents()) |
2377 | 83 | Invalid public key | 83 | Invalid public key |
2378 | 84 | 84 | ||
2379 | 85 | 85 | ||
2380 | @@ -91,7 +91,7 @@ format. | |||
2381 | 91 | >>> browser.getControl('Import Public Key').click() | 91 | >>> browser.getControl('Import Public Key').click() |
2382 | 92 | >>> soup = find_main_content(browser.contents) | 92 | >>> soup = find_main_content(browser.contents) |
2383 | 93 | >>> for tag in soup('p', 'informational message'): | 93 | >>> for tag in soup('p', 'informational message'): |
2385 | 94 | ... print tag.renderContents() | 94 | ... print(tag.renderContents()) |
2386 | 95 | SSH public key added. | 95 | SSH public key added. |
2387 | 96 | 96 | ||
2388 | 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" |
2389 | @@ -99,7 +99,7 @@ format. | |||
2390 | 99 | >>> browser.getControl('Import Public Key').click() | 99 | >>> browser.getControl('Import Public Key').click() |
2391 | 100 | >>> soup = find_main_content(browser.contents) | 100 | >>> soup = find_main_content(browser.contents) |
2392 | 101 | >>> for tag in soup('p', 'informational message'): | 101 | >>> for tag in soup('p', 'informational message'): |
2394 | 102 | ... print tag.renderContents() | 102 | ... print(tag.renderContents()) |
2395 | 103 | SSH public key added. | 103 | SSH public key added. |
2396 | 104 | 104 | ||
2397 | 105 | >>> sshkey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJseCUmxVG7D6qh4JmhLp0Du4kScScJ9PtZ0LGHYHaURnRw9tbX1wwURAio8og6dbnT75CQ3TbUE/xJhxI0aFXE= salgado@canario" | 105 | >>> sshkey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJseCUmxVG7D6qh4JmhLp0Du4kScScJ9PtZ0LGHYHaURnRw9tbX1wwURAio8og6dbnT75CQ3TbUE/xJhxI0aFXE= salgado@canario" |
2398 | @@ -107,7 +107,7 @@ format. | |||
2399 | 107 | >>> browser.getControl('Import Public Key').click() | 107 | >>> browser.getControl('Import Public Key').click() |
2400 | 108 | >>> soup = find_main_content(browser.contents) | 108 | >>> soup = find_main_content(browser.contents) |
2401 | 109 | >>> for tag in soup('p', 'informational message'): | 109 | >>> for tag in soup('p', 'informational message'): |
2403 | 110 | ... print tag.renderContents() | 110 | ... print(tag.renderContents()) |
2404 | 111 | SSH public key added. | 111 | SSH public key added. |
2405 | 112 | 112 | ||
2406 | 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" |
2407 | @@ -115,7 +115,7 @@ format. | |||
2408 | 115 | >>> browser.getControl('Import Public Key').click() | 115 | >>> browser.getControl('Import Public Key').click() |
2409 | 116 | >>> soup = find_main_content(browser.contents) | 116 | >>> soup = find_main_content(browser.contents) |
2410 | 117 | >>> for tag in soup('p', 'informational message'): | 117 | >>> for tag in soup('p', 'informational message'): |
2412 | 118 | ... print tag.renderContents() | 118 | ... print(tag.renderContents()) |
2413 | 119 | SSH public key added. | 119 | SSH public key added. |
2414 | 120 | 120 | ||
2415 | 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" |
2416 | @@ -123,7 +123,7 @@ format. | |||
2417 | 123 | >>> browser.getControl('Import Public Key').click() | 123 | >>> browser.getControl('Import Public Key').click() |
2418 | 124 | >>> soup = find_main_content(browser.contents) | 124 | >>> soup = find_main_content(browser.contents) |
2419 | 125 | >>> for tag in soup('p', 'informational message'): | 125 | >>> for tag in soup('p', 'informational message'): |
2421 | 126 | ... print tag.renderContents() | 126 | ... print(tag.renderContents()) |
2422 | 127 | SSH public key added. | 127 | SSH public key added. |
2423 | 128 | 128 | ||
2424 | 129 | Launchpad administrators are not allowed to poke at other user's ssh keys. | 129 | Launchpad administrators are not allowed to poke at other user's ssh keys. |
2425 | @@ -141,9 +141,9 @@ Salgado chooses to remove one of his ssh keys from Launchpad. The link | |||
2426 | 141 | to edit his keys is on the page. | 141 | to edit his keys is on the page. |
2427 | 142 | 142 | ||
2428 | 143 | >>> browser.open('http://launchpad.test/~salgado') | 143 | >>> browser.open('http://launchpad.test/~salgado') |
2430 | 144 | >>> print browser.title | 144 | >>> print(browser.title) |
2431 | 145 | Guilherme Salgado in Launchpad | 145 | Guilherme Salgado in Launchpad |
2433 | 146 | >>> print extract_text(find_tag_by_id(browser.contents, 'sshkeys')) | 146 | >>> print(extract_text(find_tag_by_id(browser.contents, 'sshkeys'))) |
2434 | 147 | SSH keys: Update SSH keys | 147 | SSH keys: Update SSH keys |
2435 | 148 | salgado@canario | 148 | salgado@canario |
2436 | 149 | salgado@canario | 149 | salgado@canario |
2437 | @@ -151,13 +151,13 @@ to edit his keys is on the page. | |||
2438 | 151 | salgado@canario | 151 | salgado@canario |
2439 | 152 | salgado@canario | 152 | salgado@canario |
2440 | 153 | >>> browser.getLink('Update SSH keys').click() | 153 | >>> browser.getLink('Update SSH keys').click() |
2442 | 154 | >>> print browser.title | 154 | >>> print(browser.title) |
2443 | 155 | Change your SSH keys... | 155 | Change your SSH keys... |
2444 | 156 | 156 | ||
2445 | 157 | >>> browser.getControl('Remove', index=0).click() | 157 | >>> browser.getControl('Remove', index=0).click() |
2446 | 158 | >>> soup = find_main_content(browser.contents) | 158 | >>> soup = find_main_content(browser.contents) |
2447 | 159 | >>> for tag in soup('p', 'informational message'): | 159 | >>> for tag in soup('p', 'informational message'): |
2449 | 160 | ... print tag.renderContents() | 160 | ... print(tag.renderContents()) |
2450 | 161 | Key ... removed | 161 | Key ... removed |
2451 | 162 | 162 | ||
2452 | 163 | If Salgado tries to remove a key that doesn't exist or one that doesn't | 163 | If Salgado tries to remove a key that doesn't exist or one that doesn't |
2453 | @@ -167,7 +167,7 @@ belong to him, it will fail with an error message. | |||
2454 | 167 | >>> browser.getControl('Remove', index=0).click() | 167 | >>> browser.getControl('Remove', index=0).click() |
2455 | 168 | >>> soup = find_main_content(browser.contents) | 168 | >>> soup = find_main_content(browser.contents) |
2456 | 169 | >>> for tag in soup('p', 'error message'): | 169 | >>> for tag in soup('p', 'error message'): |
2458 | 170 | ... print tag.renderContents() | 170 | ... print(tag.renderContents()) |
2459 | 171 | Cannot remove a key that doesn't exist | 171 | Cannot remove a key that doesn't exist |
2460 | 172 | 172 | ||
2461 | 173 | >>> browser.getControl(name='key', index=0).value = '1' | 173 | >>> browser.getControl(name='key', index=0).value = '1' |
2462 | diff --git a/lib/lp/registry/stories/person/xx-admin-person-review.txt b/lib/lp/registry/stories/person/xx-admin-person-review.txt | |||
2463 | index 1173f52..58c7a88 100644 | |||
2464 | --- a/lib/lp/registry/stories/person/xx-admin-person-review.txt | |||
2465 | +++ b/lib/lp/registry/stories/person/xx-admin-person-review.txt | |||
2466 | @@ -10,10 +10,10 @@ Registry admins can review users and update some of their information. | |||
2467 | 10 | 10 | ||
2468 | 11 | >>> expert_browser.open('http://launchpad.test/~salgado') | 11 | >>> expert_browser.open('http://launchpad.test/~salgado') |
2469 | 12 | >>> expert_browser.getLink('Administer').click() | 12 | >>> expert_browser.getLink('Administer').click() |
2471 | 13 | >>> print expert_browser.url | 13 | >>> print(expert_browser.url) |
2472 | 14 | http://launchpad.test/~salgado/+review | 14 | http://launchpad.test/~salgado/+review |
2473 | 15 | 15 | ||
2475 | 16 | >>> print expert_browser.title | 16 | >>> print(expert_browser.title) |
2476 | 17 | Review person... | 17 | Review person... |
2477 | 18 | 18 | ||
2478 | 19 | >>> expert_browser.getControl('Name', index=0).value = 'no-way' | 19 | >>> expert_browser.getControl('Name', index=0).value = 'no-way' |
2479 | @@ -21,7 +21,7 @@ Registry admins can review users and update some of their information. | |||
2480 | 21 | >>> expert_browser.getControl( | 21 | >>> expert_browser.getControl( |
2481 | 22 | ... name='field.personal_standing_reason').value = 'good guy' | 22 | ... name='field.personal_standing_reason').value = 'good guy' |
2482 | 23 | >>> expert_browser.getControl('Change').click() | 23 | >>> expert_browser.getControl('Change').click() |
2484 | 24 | >>> print expert_browser.url | 24 | >>> print(expert_browser.url) |
2485 | 25 | http://launchpad.test/~no-way | 25 | http://launchpad.test/~no-way |
2486 | 26 | 26 | ||
2487 | 27 | Registry experts can't change the displayname. | 27 | Registry experts can't change the displayname. |
2488 | @@ -40,9 +40,9 @@ But Launchpad admins can. | |||
2489 | 40 | >>> admin_browser.getControl( | 40 | >>> admin_browser.getControl( |
2490 | 41 | ... 'Display Name', index=0).value = 'The one and only Salgado' | 41 | ... 'Display Name', index=0).value = 'The one and only Salgado' |
2491 | 42 | >>> admin_browser.getControl('Change').click() | 42 | >>> admin_browser.getControl('Change').click() |
2493 | 43 | >>> print admin_browser.title | 43 | >>> print(admin_browser.title) |
2494 | 44 | The one and only Salgado in Launchpad | 44 | The one and only Salgado in Launchpad |
2496 | 45 | >>> print admin_browser.url | 45 | >>> print(admin_browser.url) |
2497 | 46 | http://launchpad.test/~salgado | 46 | http://launchpad.test/~salgado |
2498 | 47 | 47 | ||
2499 | 48 | 48 | ||
2500 | @@ -53,7 +53,7 @@ The review page has a link to the review account page. | |||
2501 | 53 | 53 | ||
2502 | 54 | >>> expert_browser.open('http://launchpad.test/~salgado') | 54 | >>> expert_browser.open('http://launchpad.test/~salgado') |
2503 | 55 | >>> expert_browser.getLink('Administer Account').click() | 55 | >>> expert_browser.getLink('Administer Account').click() |
2505 | 56 | >>> print expert_browser.title | 56 | >>> print(expert_browser.title) |
2506 | 57 | Review person's account... | 57 | Review person's account... |
2507 | 58 | 58 | ||
2508 | 59 | The +reviewaccount page displays account information that is normally | 59 | The +reviewaccount page displays account information that is normally |
2509 | @@ -61,7 +61,7 @@ hidden from the UI. | |||
2510 | 61 | 61 | ||
2511 | 62 | >>> content = find_main_content(expert_browser.contents) | 62 | >>> content = find_main_content(expert_browser.contents) |
2512 | 63 | >>> for tr in content.find(id='summary').findAll('tr'): | 63 | >>> for tr in content.find(id='summary').findAll('tr'): |
2514 | 64 | ... print extract_text(tr) | 64 | ... print(extract_text(tr)) |
2515 | 65 | Created: 2005-06-06 | 65 | Created: 2005-06-06 |
2516 | 66 | Creation reason: Created by the owner themselves, coming from Launchpad. | 66 | Creation reason: Created by the owner themselves, coming from Launchpad. |
2517 | 67 | OpenID identifiers: salgado_oid | 67 | OpenID identifiers: salgado_oid |
2518 | @@ -72,5 +72,5 @@ hidden from the UI. | |||
2519 | 72 | The page also contains a link back to the +review page. | 72 | The page also contains a link back to the +review page. |
2520 | 73 | 73 | ||
2521 | 74 | >>> link = expert_browser.getLink(url='+review') | 74 | >>> link = expert_browser.getLink(url='+review') |
2523 | 75 | >>> print link.text | 75 | >>> print(link.text) |
2524 | 76 | edit[IMG] Review the user's Launchpad information | 76 | edit[IMG] Review the user's Launchpad information |
2525 | diff --git a/lib/lp/registry/stories/person/xx-approve-members.txt b/lib/lp/registry/stories/person/xx-approve-members.txt | |||
2526 | index 5e1eebc..ee879bb 100644 | |||
2527 | --- a/lib/lp/registry/stories/person/xx-approve-members.txt | |||
2528 | +++ b/lib/lp/registry/stories/person/xx-approve-members.txt | |||
2529 | @@ -11,7 +11,7 @@ proposed members at once. | |||
2530 | 11 | 11 | ||
2531 | 12 | Let's have a look at the proposed members that we have. | 12 | Let's have a look at the proposed members that we have. |
2532 | 13 | 13 | ||
2534 | 14 | >>> print extract_text(find_tag_by_id(browser.contents, 'member-list')) | 14 | >>> print(extract_text(find_tag_by_id(browser.contents, 'member-list'))) |
2535 | 15 | Andrew Bennetts (Applied on ...) Approve Decline Hold | 15 | Andrew Bennetts (Applied on ...) Approve Decline Hold |
2536 | 16 | Sample Person (Applied on ...) Approve Decline Hold | 16 | Sample Person (Applied on ...) Approve Decline Hold |
2537 | 17 | 17 | ||
2538 | @@ -29,7 +29,7 @@ Person's. A comment is also sent to the applying users and the team admins. | |||
2539 | 29 | >>> len(stub.test_emails) | 29 | >>> len(stub.test_emails) |
2540 | 30 | 12 | 30 | 12 |
2541 | 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): |
2543 | 32 | ... print to_addrs | 32 | ... print(to_addrs) |
2544 | 33 | ['andrew.bennetts@ubuntulinux.com'] | 33 | ['andrew.bennetts@ubuntulinux.com'] |
2545 | 34 | ['colin.watson@ubuntulinux.com'] | 34 | ['colin.watson@ubuntulinux.com'] |
2546 | 35 | ['colin.watson@ubuntulinux.com'] | 35 | ['colin.watson@ubuntulinux.com'] |
2547 | @@ -42,7 +42,7 @@ Person's. A comment is also sent to the applying users and the team admins. | |||
2548 | 42 | ['mark@example.com'] | 42 | ['mark@example.com'] |
2549 | 43 | ['mark@example.com'] | 43 | ['mark@example.com'] |
2550 | 44 | ['test@canonical.com'] | 44 | ['test@canonical.com'] |
2552 | 45 | >>> print raw_msg | 45 | >>> print(raw_msg) |
2553 | 46 | Content-Type: text/plain; charset="utf-8" | 46 | Content-Type: text/plain; charset="utf-8" |
2554 | 47 | ... | 47 | ... |
2555 | 48 | Mark Shuttleworth said: | 48 | Mark Shuttleworth said: |
2556 | @@ -54,7 +54,7 @@ as an inactive one. | |||
2557 | 54 | 54 | ||
2558 | 55 | >>> browser.url | 55 | >>> browser.url |
2559 | 56 | 'http://launchpad.test/~ubuntu-team/+members' | 56 | 'http://launchpad.test/~ubuntu-team/+members' |
2561 | 57 | >>> print extract_text(find_tag_by_id(browser.contents, 'activemembers')) | 57 | >>> print(extract_text(find_tag_by_id(browser.contents, 'activemembers'))) |
2562 | 58 | Name Member since Expires Status | 58 | Name Member since Expires Status |
2563 | 59 | ... | 59 | ... |
2564 | 60 | Andrew Bennetts | 60 | Andrew Bennetts |
2565 | diff --git a/lib/lp/registry/stories/person/xx-deactivate-account.txt b/lib/lp/registry/stories/person/xx-deactivate-account.txt | |||
2566 | index 4267cc7..9b41ec4 100644 | |||
2567 | --- a/lib/lp/registry/stories/person/xx-deactivate-account.txt | |||
2568 | +++ b/lib/lp/registry/stories/person/xx-deactivate-account.txt | |||
2569 | @@ -56,8 +56,8 @@ And now the Launchpad page for Sample Person person will clearly say they | |||
2570 | 56 | do not use Launchpad. | 56 | do not use Launchpad. |
2571 | 57 | 57 | ||
2572 | 58 | >>> browser.open('http://launchpad.test/~name12-deactivatedaccount') | 58 | >>> browser.open('http://launchpad.test/~name12-deactivatedaccount') |
2575 | 59 | >>> print extract_text( | 59 | >>> print(extract_text( |
2576 | 60 | ... find_tag_by_id(browser.contents, 'not-lp-user-or-team')) | 60 | ... find_tag_by_id(browser.contents, 'not-lp-user-or-team'))) |
2577 | 61 | Sample Person does not use Launchpad. | 61 | Sample Person does not use Launchpad. |
2578 | 62 | 62 | ||
2579 | 63 | The bugs that were assigned to Sample Person will no longer have an | 63 | The bugs that were assigned to Sample Person will no longer have an |
2580 | @@ -65,7 +65,7 @@ assignee. | |||
2581 | 65 | 65 | ||
2582 | 66 | >>> browser.open('http://launchpad.test/debian/+source/' | 66 | >>> browser.open('http://launchpad.test/debian/+source/' |
2583 | 67 | ... 'mozilla-firefox/+bug/3') | 67 | ... 'mozilla-firefox/+bug/3') |
2585 | 68 | >>> print extract_text(find_main_content(browser.contents)) | 68 | >>> print(extract_text(find_main_content(browser.contents))) |
2586 | 69 | Bug Title Test | 69 | Bug Title Test |
2587 | 70 | ... | 70 | ... |
2588 | 71 | Assigned to | 71 | Assigned to |
2589 | @@ -76,7 +76,7 @@ Although teams have NOACCOUNT as their account_status, they are teams and so | |||
2590 | 76 | it makes no sense to say they don't use Launchpad. | 76 | it makes no sense to say they don't use Launchpad. |
2591 | 77 | 77 | ||
2592 | 78 | >>> browser.open('http://launchpad.test/~ubuntu-team') | 78 | >>> browser.open('http://launchpad.test/~ubuntu-team') |
2594 | 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')) |
2595 | 80 | None | 80 | None |
2596 | 81 | 81 | ||
2597 | 82 | The action of deactivating an account is something that can only be done by | 82 | The action of deactivating an account is something that can only be done by |
2598 | diff --git a/lib/lp/registry/stories/person/xx-people-index.txt b/lib/lp/registry/stories/person/xx-people-index.txt | |||
2599 | index e09d112..ea6f71d 100644 | |||
2600 | --- a/lib/lp/registry/stories/person/xx-people-index.txt | |||
2601 | +++ b/lib/lp/registry/stories/person/xx-people-index.txt | |||
2602 | @@ -1,9 +1,9 @@ | |||
2603 | 1 | 1 | ||
2604 | 2 | Test /people. | 2 | Test /people. |
2605 | 3 | 3 | ||
2607 | 4 | >>> print http(r""" | 4 | >>> print(http(r""" |
2608 | 5 | ... GET /people HTTP/1.1 | 5 | ... GET /people HTTP/1.1 |
2610 | 6 | ... """) | 6 | ... """)) |
2611 | 7 | HTTP/1.1 200 Ok | 7 | HTTP/1.1 200 Ok |
2612 | 8 | Content-Length: ... | 8 | Content-Length: ... |
2613 | 9 | Content-Type: text/html;charset=utf-8 | 9 | Content-Type: text/html;charset=utf-8 |
2614 | diff --git a/lib/lp/registry/stories/person/xx-people-search.txt b/lib/lp/registry/stories/person/xx-people-search.txt | |||
2615 | index 702092b..c9b4b9a 100644 | |||
2616 | --- a/lib/lp/registry/stories/person/xx-people-search.txt | |||
2617 | +++ b/lib/lp/registry/stories/person/xx-people-search.txt | |||
2618 | @@ -5,7 +5,7 @@ Searching for people | |||
2619 | 5 | -------------------- | 5 | -------------------- |
2620 | 6 | 6 | ||
2621 | 7 | >>> browser.open('http://launchpad.test/people') | 7 | >>> browser.open('http://launchpad.test/people') |
2623 | 8 | >>> print browser.title | 8 | >>> print(browser.title) |
2624 | 9 | People and teams in Launchpad | 9 | People and teams in Launchpad |
2625 | 10 | 10 | ||
2626 | 11 | Search for all people and teams with the string "foo bar". There | 11 | Search for all people and teams with the string "foo bar". There |
2627 | @@ -14,13 +14,13 @@ should just be the one person named "Foo Bar" found. | |||
2628 | 14 | >>> browser.getControl(name='name').value = 'foo bar' | 14 | >>> browser.getControl(name='name').value = 'foo bar' |
2629 | 15 | >>> browser.getControl('Search').click() | 15 | >>> browser.getControl('Search').click() |
2630 | 16 | >>> listing = find_tag_by_id(browser.contents, 'people-results') | 16 | >>> listing = find_tag_by_id(browser.contents, 'people-results') |
2632 | 17 | >>> print extract_text(listing) | 17 | >>> print(extract_text(listing)) |
2633 | 18 | Name Launchpad ID Karma | 18 | Name Launchpad ID Karma |
2634 | 19 | Foo Bar name16 241 | 19 | Foo Bar name16 241 |
2635 | 20 | 20 | ||
2636 | 21 | The listing is sortable. | 21 | The listing is sortable. |
2637 | 22 | 22 | ||
2639 | 23 | >>> print ' '.join(listing['class']) | 23 | >>> print(' '.join(listing['class'])) |
2640 | 24 | listing sortable | 24 | listing sortable |
2641 | 25 | 25 | ||
2642 | 26 | Search for all people and teams like "launchpad" the users sees three | 26 | Search for all people and teams like "launchpad" the users sees three |
2643 | @@ -29,7 +29,7 @@ columns of people and teams.. | |||
2644 | 29 | >>> browser.getControl(name='name').value = 'launchpad' | 29 | >>> browser.getControl(name='name').value = 'launchpad' |
2645 | 30 | >>> browser.getControl('Search').click() | 30 | >>> browser.getControl('Search').click() |
2646 | 31 | >>> listing = find_tag_by_id(browser.contents, 'people-results') | 31 | >>> listing = find_tag_by_id(browser.contents, 'people-results') |
2648 | 32 | >>> print extract_text(listing, formatter='html') | 32 | >>> print(extract_text(listing, formatter='html')) |
2649 | 33 | Name Launchpad ID Karma | 33 | Name Launchpad ID Karma |
2650 | 34 | Julian Edwards launchpad-julian-edwards 0 | 34 | Julian Edwards launchpad-julian-edwards 0 |
2651 | 35 | Launchpad Administrators admins — | 35 | Launchpad Administrators admins — |
2652 | @@ -45,7 +45,7 @@ shown. There are only two columns because teams cannot have karma. | |||
2653 | 45 | >>> browser.getControl(name='searchfor').value = ['teamsonly'] | 45 | >>> browser.getControl(name='searchfor').value = ['teamsonly'] |
2654 | 46 | >>> browser.getControl('Search').click() | 46 | >>> browser.getControl('Search').click() |
2655 | 47 | >>> listing = find_tag_by_id(browser.contents, 'people-results') | 47 | >>> listing = find_tag_by_id(browser.contents, 'people-results') |
2657 | 48 | >>> print extract_text(listing) | 48 | >>> print(extract_text(listing)) |
2658 | 49 | Name Launchpad ID | 49 | Name Launchpad ID |
2659 | 50 | Launchpad Administrators admins | 50 | Launchpad Administrators admins |
2660 | 51 | Launchpad Beta Testers launchpad-beta-testers | 51 | Launchpad Beta Testers launchpad-beta-testers |
2661 | @@ -59,7 +59,7 @@ Restrict the search to people and only individuals are listed. | |||
2662 | 59 | >>> browser.getControl(name='searchfor').value = ['peopleonly'] | 59 | >>> browser.getControl(name='searchfor').value = ['peopleonly'] |
2663 | 60 | >>> browser.getControl('Search').click() | 60 | >>> browser.getControl('Search').click() |
2664 | 61 | >>> listing = find_tag_by_id(browser.contents, 'people-results') | 61 | >>> listing = find_tag_by_id(browser.contents, 'people-results') |
2666 | 62 | >>> print extract_text(listing) | 62 | >>> print(extract_text(listing)) |
2667 | 63 | Name Launchpad ID Karma | 63 | Name Launchpad ID Karma |
2668 | 64 | Julian Edwards launchpad-julian-edwards 0 | 64 | Julian Edwards launchpad-julian-edwards 0 |
2669 | 65 | Launchpad Beta Testers Owner launchpad-beta-owner 0 | 65 | Launchpad Beta Testers Owner launchpad-beta-owner 0 |
2670 | diff --git a/lib/lp/registry/stories/person/xx-person-claim-merge.txt b/lib/lp/registry/stories/person/xx-person-claim-merge.txt | |||
2671 | index 1b723b6..caad3d3 100644 | |||
2672 | --- a/lib/lp/registry/stories/person/xx-person-claim-merge.txt | |||
2673 | +++ b/lib/lp/registry/stories/person/xx-person-claim-merge.txt | |||
2674 | @@ -7,7 +7,7 @@ exception that will redirect the user to the login page. | |||
2675 | 7 | 7 | ||
2676 | 8 | >>> anon_browser.open('http://launchpad.test/~matsubara') | 8 | >>> anon_browser.open('http://launchpad.test/~matsubara') |
2677 | 9 | >>> link = anon_browser.getLink("Are you Diogo Matsubara?") | 9 | >>> link = anon_browser.getLink("Are you Diogo Matsubara?") |
2679 | 10 | >>> print link.url | 10 | >>> print(link.url) |
2680 | 11 | http://launchpad.test/people/+requestmerge?field.dupe_person=matsubara | 11 | http://launchpad.test/people/+requestmerge?field.dupe_person=matsubara |
2681 | 12 | >>> link.click() | 12 | >>> link.click() |
2682 | 13 | Traceback (most recent call last): | 13 | Traceback (most recent call last): |
2683 | 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 | |||
2684 | index ae19df1..f2a6112 100644 | |||
2685 | --- a/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.txt | |||
2686 | +++ b/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.txt | |||
2687 | @@ -13,7 +13,7 @@ profile page and uses the 'Update Jabber IDs' link. | |||
2688 | 13 | 13 | ||
2689 | 14 | >>> user_browser.open('http://launchpad.test/~no-priv') | 14 | >>> user_browser.open('http://launchpad.test/~no-priv') |
2690 | 15 | >>> user_browser.getLink('Update Jabber IDs').click() | 15 | >>> user_browser.getLink('Update Jabber IDs').click() |
2692 | 16 | >>> print user_browser.title | 16 | >>> print(user_browser.title) |
2693 | 17 | No Privileges Person's Jabber IDs... | 17 | No Privileges Person's Jabber IDs... |
2694 | 18 | 18 | ||
2695 | 19 | The user enters the Jabber ID in the text field and clicks on the | 19 | The user enters the Jabber ID in the text field and clicks on the |
2696 | @@ -29,7 +29,7 @@ an error is displayed and the user can enter another one: | |||
2697 | 29 | 29 | ||
2698 | 30 | >>> def show_errors(browser): | 30 | >>> def show_errors(browser): |
2699 | 31 | ... for error in find_tags_by_class(browser.contents, 'error'): | 31 | ... for error in find_tags_by_class(browser.contents, 'error'): |
2701 | 32 | ... print extract_text(error) | 32 | ... print(extract_text(error)) |
2702 | 33 | >>> show_errors(user_browser) | 33 | >>> show_errors(user_browser) |
2703 | 34 | There is 1 error. | 34 | There is 1 error. |
2704 | 35 | New Jabber user ID: | 35 | New Jabber user ID: |
2705 | @@ -46,7 +46,7 @@ it will be associated with their account. | |||
2706 | 46 | >>> def show_jabberids(browser): | 46 | >>> def show_jabberids(browser): |
2707 | 47 | ... tags = find_tag_by_id(browser.contents, 'jabber-ids') | 47 | ... tags = find_tag_by_id(browser.contents, 'jabber-ids') |
2708 | 48 | ... for dd in tags.findAll('dd'): | 48 | ... for dd in tags.findAll('dd'): |
2710 | 49 | ... print extract_text(dd) | 49 | ... print(extract_text(dd)) |
2711 | 50 | 50 | ||
2712 | 51 | >>> show_jabberids(user_browser) | 51 | >>> show_jabberids(user_browser) |
2713 | 52 | no-priv@jabber.org | 52 | no-priv@jabber.org |
2714 | diff --git a/lib/lp/registry/stories/person/xx-person-edit.txt b/lib/lp/registry/stories/person/xx-person-edit.txt | |||
2715 | index 54b12b6..4769324 100644 | |||
2716 | --- a/lib/lp/registry/stories/person/xx-person-edit.txt | |||
2717 | +++ b/lib/lp/registry/stories/person/xx-person-edit.txt | |||
2718 | @@ -23,8 +23,8 @@ Launchpad. | |||
2719 | 23 | They can see a link to an FAQ that explains launchpad accounts and passwords. | 23 | They can see a link to an FAQ that explains launchpad accounts and passwords. |
2720 | 24 | Note that this is a link to an FAQ in production databases. | 24 | Note that this is a link to an FAQ in production databases. |
2721 | 25 | 25 | ||
2724 | 26 | >>> print browser.getLink( | 26 | >>> print(browser.getLink( |
2725 | 27 | ... 'Learn about your Launchpad account and password').url | 27 | ... 'Learn about your Launchpad account and password').url) |
2726 | 28 | http://launchpad.test/launchpad/+faq/51 | 28 | http://launchpad.test/launchpad/+faq/51 |
2727 | 29 | 29 | ||
2728 | 30 | They noticed that their information is out of date and will update it. | 30 | They noticed that their information is out of date and will update it. |
2729 | 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 | |||
2730 | index 352d3e9..d3f8e52 100644 | |||
2731 | --- a/lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt | |||
2732 | +++ b/lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt | |||
2733 | @@ -38,7 +38,7 @@ Attempts to claim a revoked OpenPGP key fail: | |||
2734 | 38 | ... '84D205F03E1E67096CB54E262BE83793AACCD97C') | 38 | ... '84D205F03E1E67096CB54E262BE83793AACCD97C') |
2735 | 39 | >>> browser.getControl('Import Key').click() | 39 | >>> browser.getControl('Import Key').click() |
2736 | 40 | >>> for tag in find_tags_by_class(browser.contents, 'error message'): | 40 | >>> for tag in find_tags_by_class(browser.contents, 'error message'): |
2738 | 41 | ... print tag.renderContents() | 41 | ... print(tag.renderContents()) |
2739 | 42 | <BLANKLINE> | 42 | <BLANKLINE> |
2740 | 43 | The key 84D205F03E1E67096CB54E262BE83793AACCD97C cannot be validated | 43 | The key 84D205F03E1E67096CB54E262BE83793AACCD97C cannot be validated |
2741 | 44 | because it has been publicly revoked. | 44 | because it has been publicly revoked. |
2742 | @@ -54,7 +54,7 @@ Attempts to claim an expired OpenPGP key also fail: | |||
2743 | 54 | ... '0DD64D28E5F41138533495200E3DB4D402F53CC6') | 54 | ... '0DD64D28E5F41138533495200E3DB4D402F53CC6') |
2744 | 55 | >>> browser.getControl('Import Key').click() | 55 | >>> browser.getControl('Import Key').click() |
2745 | 56 | >>> for tag in find_tags_by_class(browser.contents, 'error message'): | 56 | >>> for tag in find_tags_by_class(browser.contents, 'error message'): |
2747 | 57 | ... print tag.renderContents() | 57 | ... print(tag.renderContents()) |
2748 | 58 | <BLANKLINE> | 58 | <BLANKLINE> |
2749 | 59 | The key 0DD64D28E5F41138533495200E3DB4D402F53CC6 cannot be validated | 59 | The key 0DD64D28E5F41138533495200E3DB4D402F53CC6 cannot be validated |
2750 | 60 | because it has expired. Change the expiry date (in a terminal, enter | 60 | because it has expired. Change the expiry date (in a terminal, enter |
2751 | @@ -89,7 +89,7 @@ Try to validate the revoked OpenPGP key: | |||
2752 | 89 | ... 'http://launchpad.test/token/%s/+validategpg' % revoked_key_token) | 89 | ... 'http://launchpad.test/token/%s/+validategpg' % revoked_key_token) |
2753 | 90 | >>> browser.getControl('Continue').click() | 90 | >>> browser.getControl('Continue').click() |
2754 | 91 | >>> for tag in find_tags_by_class(browser.contents, 'error message'): | 91 | >>> for tag in find_tags_by_class(browser.contents, 'error message'): |
2756 | 92 | ... print tag.renderContents() | 92 | ... print(tag.renderContents()) |
2757 | 93 | There is 1 error. | 93 | There is 1 error. |
2758 | 94 | The key 84D205F03E1E67096CB54E262BE83793AACCD97C cannot be validated | 94 | The key 84D205F03E1E67096CB54E262BE83793AACCD97C cannot be validated |
2759 | 95 | because it has been publicly revoked. | 95 | because it has been publicly revoked. |
2760 | @@ -105,7 +105,7 @@ Try to validate the revoked OpenPGP key: | |||
2761 | 105 | ... 'http://launchpad.test/token/%s/+validategpg' % expired_key_token) | 105 | ... 'http://launchpad.test/token/%s/+validategpg' % expired_key_token) |
2762 | 106 | >>> browser.getControl('Continue').click() | 106 | >>> browser.getControl('Continue').click() |
2763 | 107 | >>> for tag in find_tags_by_class(browser.contents, 'error message'): | 107 | >>> for tag in find_tags_by_class(browser.contents, 'error message'): |
2765 | 108 | ... print tag.renderContents() | 108 | ... print(tag.renderContents()) |
2766 | 109 | There is 1 error. | 109 | There is 1 error. |
2767 | 110 | The key 0DD64D28E5F41138533495200E3DB4D402F53CC6 cannot be validated | 110 | The key 0DD64D28E5F41138533495200E3DB4D402F53CC6 cannot be validated |
2768 | 111 | because it has expired. Change the expiry date (in a terminal, enter | 111 | because it has expired. Change the expiry date (in a terminal, enter |
2769 | diff --git a/lib/lp/registry/stories/person/xx-person-home.txt b/lib/lp/registry/stories/person/xx-person-home.txt | |||
2770 | index ecc4958..e1de161 100644 | |||
2771 | --- a/lib/lp/registry/stories/person/xx-person-home.txt | |||
2772 | +++ b/lib/lp/registry/stories/person/xx-person-home.txt | |||
2773 | @@ -11,7 +11,7 @@ profile for them. | |||
2774 | 11 | 'Diogo Matsubara does not use Launchpad' | 11 | 'Diogo Matsubara does not use Launchpad' |
2775 | 12 | 12 | ||
2776 | 13 | >>> content = find_main_content(browser.contents).find('p') | 13 | >>> content = find_main_content(browser.contents).find('p') |
2778 | 14 | >>> print extract_text(content) | 14 | >>> print(extract_text(content)) |
2779 | 15 | Diogo Matsubara does not use Launchpad. This page was created on | 15 | Diogo Matsubara does not use Launchpad. This page was created on |
2780 | 16 | 2006-12-13 when importing the Portuguese... | 16 | 2006-12-13 when importing the Portuguese... |
2781 | 17 | 17 | ||
2782 | @@ -23,31 +23,31 @@ Mark has a registered email address, and he has chosen to disclose it to | |||
2783 | 23 | the world. Anonymous users cannot see Mark's address | 23 | the world. Anonymous users cannot see Mark's address |
2784 | 24 | 24 | ||
2785 | 25 | >>> anon_browser.open('http://launchpad.test/~mark') | 25 | >>> anon_browser.open('http://launchpad.test/~mark') |
2788 | 26 | >>> print extract_text( | 26 | >>> print(extract_text( |
2789 | 27 | ... find_tag_by_id(anon_browser.contents, 'email-addresses')) | 27 | ... find_tag_by_id(anon_browser.contents, 'email-addresses'))) |
2790 | 28 | Email: Log in for email information. | 28 | Email: Log in for email information. |
2791 | 29 | 29 | ||
2792 | 30 | A logged in user such as Sample Person, can see Mark's addresses. | 30 | A logged in user such as Sample Person, can see Mark's addresses. |
2793 | 31 | 31 | ||
2794 | 32 | >>> sample_browser = setupBrowser(auth='Basic test@canonical.com:test') | 32 | >>> sample_browser = setupBrowser(auth='Basic test@canonical.com:test') |
2795 | 33 | >>> sample_browser.open('http://launchpad.test/~mark') | 33 | >>> sample_browser.open('http://launchpad.test/~mark') |
2798 | 34 | >>> print extract_text( | 34 | >>> print(extract_text( |
2799 | 35 | ... find_tag_by_id(sample_browser.contents, 'email-addresses')) | 35 | ... find_tag_by_id(sample_browser.contents, 'email-addresses'))) |
2800 | 36 | Email: mark@example.com | 36 | Email: mark@example.com |
2801 | 37 | 37 | ||
2802 | 38 | As for Sample Person, they have chosen not to disclose their email addresses. | 38 | As for Sample Person, they have chosen not to disclose their email addresses. |
2803 | 39 | Unprivileged users like No Privileges Person cannot see their addresses: | 39 | Unprivileged users like No Privileges Person cannot see their addresses: |
2804 | 40 | 40 | ||
2805 | 41 | >>> user_browser.open('http://launchpad.test/~name12') | 41 | >>> user_browser.open('http://launchpad.test/~name12') |
2808 | 42 | >>> print extract_text( | 42 | >>> print(extract_text( |
2809 | 43 | ... find_tag_by_id(user_browser.contents, 'email-addresses')) | 43 | ... find_tag_by_id(user_browser.contents, 'email-addresses'))) |
2810 | 44 | Email: No public address provided. | 44 | Email: No public address provided. |
2811 | 45 | 45 | ||
2812 | 46 | But Foo Bar can: | 46 | But Foo Bar can: |
2813 | 47 | 47 | ||
2814 | 48 | >>> admin_browser.open('http://launchpad.test/~name12') | 48 | >>> admin_browser.open('http://launchpad.test/~name12') |
2817 | 49 | >>> print extract_text( | 49 | >>> print(extract_text( |
2818 | 50 | ... find_tag_by_id(admin_browser.contents, 'email-addresses')) | 50 | ... find_tag_by_id(admin_browser.contents, 'email-addresses'))) |
2819 | 51 | Email: | 51 | Email: |
2820 | 52 | test@canonical.com | 52 | test@canonical.com |
2821 | 53 | testing@canonical.com | 53 | testing@canonical.com |
2822 | @@ -61,25 +61,25 @@ Open ID link | |||
2823 | 61 | When a person visits their own page, they'll see their OpenID login URL. | 61 | When a person visits their own page, they'll see their OpenID login URL. |
2824 | 62 | 62 | ||
2825 | 63 | >>> user_browser.open('http://launchpad.test/~no-priv') | 63 | >>> user_browser.open('http://launchpad.test/~no-priv') |
2828 | 64 | >>> print extract_text( | 64 | >>> print(extract_text( |
2829 | 65 | ... find_tag_by_id(user_browser.contents, 'openid-info')) | 65 | ... find_tag_by_id(user_browser.contents, 'openid-info'))) |
2830 | 66 | OpenID login: | 66 | OpenID login: |
2831 | 67 | http://launchpad.test/~no-priv... | 67 | http://launchpad.test/~no-priv... |
2832 | 68 | 68 | ||
2833 | 69 | The URL is followed by a helpful link. | 69 | The URL is followed by a helpful link. |
2834 | 70 | 70 | ||
2836 | 71 | >>> print user_browser.getLink('OpenID help').url | 71 | >>> print(user_browser.getLink('OpenID help').url) |
2837 | 72 | http://launchpad.test/+help-registry/openid.html | 72 | http://launchpad.test/+help-registry/openid.html |
2838 | 73 | 73 | ||
2839 | 74 | However, when the user visits someone else's page, they see no such URL. | 74 | However, when the user visits someone else's page, they see no such URL. |
2840 | 75 | 75 | ||
2841 | 76 | >>> user_browser.open('http://launchpad.test/~salgado') | 76 | >>> user_browser.open('http://launchpad.test/~salgado') |
2843 | 77 | >>> print find_tag_by_id(user_browser.contents, 'openid-info') | 77 | >>> print(find_tag_by_id(user_browser.contents, 'openid-info')) |
2844 | 78 | None | 78 | None |
2845 | 79 | 79 | ||
2846 | 80 | And there is no helpful link. | 80 | And there is no helpful link. |
2847 | 81 | 81 | ||
2849 | 82 | >>> print user_browser.getLink('openid help').url | 82 | >>> print(user_browser.getLink('openid help').url) |
2850 | 83 | Traceback (most recent call last): | 83 | Traceback (most recent call last): |
2851 | 84 | ... | 84 | ... |
2852 | 85 | LinkNotFoundError | 85 | LinkNotFoundError |
2853 | @@ -91,13 +91,13 @@ Jabber IDs | |||
2854 | 91 | A person's jabber IDs are only show to authenticated users. | 91 | A person's jabber IDs are only show to authenticated users. |
2855 | 92 | 92 | ||
2856 | 93 | >>> user_browser.open('http://launchpad.test/~mark') | 93 | >>> user_browser.open('http://launchpad.test/~mark') |
2859 | 94 | >>> print extract_text( | 94 | >>> print(extract_text( |
2860 | 95 | ... find_tag_by_id(user_browser.contents, 'jabber-ids')) | 95 | ... find_tag_by_id(user_browser.contents, 'jabber-ids'))) |
2861 | 96 | Jabber: markshuttleworth@jabber.org | 96 | Jabber: markshuttleworth@jabber.org |
2862 | 97 | 97 | ||
2863 | 98 | >>> anon_browser.open('http://launchpad.test/~mark') | 98 | >>> anon_browser.open('http://launchpad.test/~mark') |
2866 | 99 | >>> print extract_text( | 99 | >>> print(extract_text( |
2867 | 100 | ... find_tag_by_id(anon_browser.contents, 'jabber-ids')) | 100 | ... find_tag_by_id(anon_browser.contents, 'jabber-ids'))) |
2868 | 101 | Jabber: <email address hidden> | 101 | Jabber: <email address hidden> |
2869 | 102 | 102 | ||
2870 | 103 | 103 | ||
2871 | @@ -109,12 +109,12 @@ just by following the link to that person's OpenPGP keys, only | |||
2872 | 109 | authenticated users can see the key fingerprint with a link to the keyserver. | 109 | authenticated users can see the key fingerprint with a link to the keyserver. |
2873 | 110 | 110 | ||
2874 | 111 | >>> user_browser.open('http://launchpad.test/~name16') | 111 | >>> user_browser.open('http://launchpad.test/~name16') |
2876 | 112 | >>> print find_tag_by_id(user_browser.contents, 'pgp-keys') | 112 | >>> print(find_tag_by_id(user_browser.contents, 'pgp-keys')) |
2877 | 113 | <dl... | 113 | <dl... |
2878 | 114 | <a href="https://keyserver... | 114 | <a href="https://keyserver... |
2879 | 115 | 115 | ||
2880 | 116 | >>> anon_browser.open('http://launchpad.test/~name16') | 116 | >>> anon_browser.open('http://launchpad.test/~name16') |
2882 | 117 | >>> print find_tag_by_id(anon_browser.contents, 'pgp-keys') | 117 | >>> print(find_tag_by_id(anon_browser.contents, 'pgp-keys')) |
2883 | 118 | <dl... | 118 | <dl... |
2884 | 119 | <dd> ABCDEF0123456789ABCDDCBA0000111112345678... | 119 | <dd> ABCDEF0123456789ABCDDCBA0000111112345678... |
2885 | 120 | 120 | ||
2886 | @@ -126,7 +126,7 @@ The contact details portlet shows the languages that the user speaks. No | |||
2887 | 126 | Privileges Person can see the languages that mark speaks. | 126 | Privileges Person can see the languages that mark speaks. |
2888 | 127 | 127 | ||
2889 | 128 | >>> user_browser.open('http://launchpad.test/~carlos') | 128 | >>> user_browser.open('http://launchpad.test/~carlos') |
2891 | 129 | >>> print extract_text(find_tag_by_id(user_browser.contents, 'languages')) | 129 | >>> print(extract_text(find_tag_by_id(user_browser.contents, 'languages'))) |
2892 | 130 | Languages: | 130 | Languages: |
2893 | 131 | Catalan, English, Spanish | 131 | Catalan, English, Spanish |
2894 | 132 | 132 | ||
2895 | @@ -134,7 +134,7 @@ When viewing their own page, No Privileges Person sees their languages and | |||
2896 | 134 | can edit them. | 134 | can edit them. |
2897 | 135 | 135 | ||
2898 | 136 | >>> user_browser.open('http://launchpad.test/~no-priv') | 136 | >>> user_browser.open('http://launchpad.test/~no-priv') |
2900 | 137 | >>> print extract_text(find_tag_by_id(user_browser.contents, 'languages')) | 137 | >>> print(extract_text(find_tag_by_id(user_browser.contents, 'languages'))) |
2901 | 138 | Languages: Set preferred languages | 138 | Languages: Set preferred languages |
2902 | 139 | English | 139 | English |
2903 | 140 | 140 | ||
2904 | @@ -145,36 +145,36 @@ Summary Pagelets | |||
2905 | 145 | A person's homepage also lists Karma and Time zone information: | 145 | A person's homepage also lists Karma and Time zone information: |
2906 | 146 | 146 | ||
2907 | 147 | >>> browser.open('http://launchpad.test/~mark') | 147 | >>> browser.open('http://launchpad.test/~mark') |
2909 | 148 | >>> print extract_text(find_tag_by_id(browser.contents, 'karma')) | 148 | >>> print(extract_text(find_tag_by_id(browser.contents, 'karma'))) |
2910 | 149 | Karma: 130 Karma help | 149 | Karma: 130 Karma help |
2911 | 150 | 150 | ||
2912 | 151 | >>> browser.open('http://launchpad.test/~ddaa') | 151 | >>> browser.open('http://launchpad.test/~ddaa') |
2914 | 152 | >>> print extract_text(find_tag_by_id(browser.contents, 'timezone')) | 152 | >>> print(extract_text(find_tag_by_id(browser.contents, 'timezone'))) |
2915 | 153 | Time zone: UTC (UTC+0000) | 153 | Time zone: UTC (UTC+0000) |
2916 | 154 | 154 | ||
2917 | 155 | Negative Ubuntu Code of Conduct signatory status is only displayed for | 155 | Negative Ubuntu Code of Conduct signatory status is only displayed for |
2918 | 156 | yourself; others won't see it: | 156 | yourself; others won't see it: |
2919 | 157 | 157 | ||
2921 | 158 | >>> print find_tag_by_id(browser.contents, 'ubuntu-coc') | 158 | >>> print(find_tag_by_id(browser.contents, 'ubuntu-coc')) |
2922 | 159 | None | 159 | None |
2923 | 160 | 160 | ||
2924 | 161 | >>> browser = setupBrowser(auth='Basic mark@example.com:test') | 161 | >>> browser = setupBrowser(auth='Basic mark@example.com:test') |
2925 | 162 | >>> browser.open('http://launchpad.test/~mark') | 162 | >>> browser.open('http://launchpad.test/~mark') |
2927 | 163 | >>> print extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc')) | 163 | >>> print(extract_text(find_tag_by_id(browser.contents, 'ubuntu-coc'))) |
2928 | 164 | Signed Ubuntu Code of Conduct: No | 164 | Signed Ubuntu Code of Conduct: No |
2929 | 165 | 165 | ||
2930 | 166 | You can grab certain bits of information programatically: | 166 | You can grab certain bits of information programatically: |
2931 | 167 | 167 | ||
2933 | 168 | >>> print extract_text(find_tag_by_id(browser.contents, 'karma-total')) | 168 | >>> print(extract_text(find_tag_by_id(browser.contents, 'karma-total'))) |
2934 | 169 | 130 | 169 | 130 |
2935 | 170 | 170 | ||
2937 | 171 | >>> print extract_text(find_tag_by_id(browser.contents, 'member-since')) | 171 | >>> print(extract_text(find_tag_by_id(browser.contents, 'member-since'))) |
2938 | 172 | 2005-06-06 | 172 | 2005-06-06 |
2939 | 173 | 173 | ||
2940 | 174 | Teams don't have member-since; they have created-date: | 174 | Teams don't have member-since; they have created-date: |
2941 | 175 | 175 | ||
2942 | 176 | >>> browser.open('http://launchpad.test/~guadamen') | 176 | >>> browser.open('http://launchpad.test/~guadamen') |
2944 | 177 | >>> print extract_text(find_tag_by_id(browser.contents, 'created-date')) | 177 | >>> print(extract_text(find_tag_by_id(browser.contents, 'created-date'))) |
2945 | 178 | 2005-06-06 | 178 | 2005-06-06 |
2946 | 179 | 179 | ||
2947 | 180 | 180 | ||
2948 | @@ -188,11 +188,11 @@ most active and also the areas in which they worked on each project. | |||
2949 | 188 | >>> anon_browser.open('http://launchpad.test/~name16') | 188 | >>> anon_browser.open('http://launchpad.test/~name16') |
2950 | 189 | >>> table = find_tag_by_id(anon_browser.contents, 'contributions') | 189 | >>> table = find_tag_by_id(anon_browser.contents, 'contributions') |
2951 | 190 | >>> for tr in table.findAll('tr'): | 190 | >>> for tr in table.findAll('tr'): |
2953 | 191 | ... print tr.find('th').find('a').renderContents() | 191 | ... print(tr.find('th').find('a').renderContents()) |
2954 | 192 | ... for td in tr.findAll('td'): | 192 | ... for td in tr.findAll('td'): |
2955 | 193 | ... img = td.find('img') | 193 | ... img = td.find('img') |
2956 | 194 | ... if img is not None: | 194 | ... if img is not None: |
2958 | 195 | ... print "\t", img['title'] | 195 | ... print("\t", img['title']) |
2959 | 196 | Evolution | 196 | Evolution |
2960 | 197 | Bug Management | 197 | Bug Management |
2961 | 198 | Translations in Rosetta | 198 | Translations in Rosetta |
2962 | @@ -214,13 +214,13 @@ If the person hasn't made any contributions, the table is not present in | |||
2963 | 214 | its page. | 214 | its page. |
2964 | 215 | 215 | ||
2965 | 216 | >>> anon_browser.open('http://launchpad.test/~jdub') | 216 | >>> anon_browser.open('http://launchpad.test/~jdub') |
2967 | 217 | >>> print find_tag_by_id(anon_browser.contents, 'contributions') | 217 | >>> print(find_tag_by_id(anon_browser.contents, 'contributions')) |
2968 | 218 | None | 218 | None |
2969 | 219 | 219 | ||
2970 | 220 | The same for teams. | 220 | The same for teams. |
2971 | 221 | 221 | ||
2972 | 222 | >>> anon_browser.open('http://launchpad.test/~ubuntu-team') | 222 | >>> anon_browser.open('http://launchpad.test/~ubuntu-team') |
2974 | 223 | >>> print find_tag_by_id(anon_browser.contents, 'contributions') | 223 | >>> print(find_tag_by_id(anon_browser.contents, 'contributions')) |
2975 | 224 | None | 224 | None |
2976 | 225 | 225 | ||
2977 | 226 | 226 | ||
2978 | @@ -232,10 +232,10 @@ were imported into Launchpad. Any user can see an unclaimed profile and | |||
2979 | 232 | a link to request a claim the profile. | 232 | a link to request a claim the profile. |
2980 | 233 | 233 | ||
2981 | 234 | >>> anon_browser.open('https://launchpad.test/~jvprat') | 234 | >>> anon_browser.open('https://launchpad.test/~jvprat') |
2983 | 235 | >>> print anon_browser.title | 235 | >>> print(anon_browser.title) |
2984 | 236 | Jordi Vilalta does not use Launchpad | 236 | Jordi Vilalta does not use Launchpad |
2985 | 237 | 237 | ||
2987 | 238 | >>> print extract_text(find_main_content(anon_browser.contents)) | 238 | >>> print(extract_text(find_main_content(anon_browser.contents))) |
2988 | 239 | Jordi Vilalta does not use Launchpad. This page was created on ... | 239 | Jordi Vilalta does not use Launchpad. This page was created on ... |
2989 | 240 | when importing the Catalan (ca) translation of pmount in Ubuntu Hoary... | 240 | when importing the Catalan (ca) translation of pmount in Ubuntu Hoary... |
2990 | 241 | 241 | ||
2991 | @@ -257,16 +257,16 @@ users cannot see this, but admins like Foo Bar can. | |||
2992 | 257 | >>> logout() | 257 | >>> logout() |
2993 | 258 | 258 | ||
2994 | 259 | >>> anon_browser.open('https://launchpad.test/~jvprat') | 259 | >>> anon_browser.open('https://launchpad.test/~jvprat') |
2996 | 260 | >>> print find_tag_by_id(anon_browser.contents, 'email-addresses') | 260 | >>> print(find_tag_by_id(anon_browser.contents, 'email-addresses')) |
2997 | 261 | None | 261 | None |
2998 | 262 | 262 | ||
2999 | 263 | >>> user_browser.open('https://launchpad.test/~jvprat') | 263 | >>> user_browser.open('https://launchpad.test/~jvprat') |
3001 | 264 | >>> print find_tag_by_id(user_browser.contents, 'email-addresses') | 264 | >>> print(find_tag_by_id(user_browser.contents, 'email-addresses')) |
3002 | 265 | None | 265 | None |
3003 | 266 | 266 | ||
3004 | 267 | >>> admin_browser.open('https://launchpad.test/~jvprat') | 267 | >>> admin_browser.open('https://launchpad.test/~jvprat') |
3007 | 268 | >>> print extract_text( | 268 | >>> print(extract_text( |
3008 | 269 | ... find_tag_by_id(admin_browser.contents, 'email-addresses')) | 269 | ... find_tag_by_id(admin_browser.contents, 'email-addresses'))) |
3009 | 270 | jvprat@wanadoo.es | 270 | jvprat@wanadoo.es |
3010 | 271 | Change email settings | 271 | Change email settings |
3011 | 272 | 272 | ||
3012 | diff --git a/lib/lp/registry/stories/person/xx-person-karma.txt b/lib/lp/registry/stories/person/xx-person-karma.txt | |||
3013 | index db6931a..fe6181c 100644 | |||
3014 | --- a/lib/lp/registry/stories/person/xx-person-karma.txt | |||
3015 | +++ b/lib/lp/registry/stories/person/xx-person-karma.txt | |||
3016 | @@ -7,32 +7,32 @@ the community. A person's current total karma is available on their | |||
3017 | 7 | profile page. | 7 | profile page. |
3018 | 8 | 8 | ||
3019 | 9 | >>> anon_browser.open('http://launchpad.test/~name12') | 9 | >>> anon_browser.open('http://launchpad.test/~name12') |
3021 | 10 | >>> print anon_browser.title | 10 | >>> print(anon_browser.title) |
3022 | 11 | Sample Person in Launchpad | 11 | Sample Person in Launchpad |
3023 | 12 | 12 | ||
3024 | 13 | >>> content = find_main_content(anon_browser.contents) | 13 | >>> content = find_main_content(anon_browser.contents) |
3025 | 14 | >>> karma = find_tag_by_id(content, 'karma-total') | 14 | >>> karma = find_tag_by_id(content, 'karma-total') |
3027 | 15 | >>> print karma.renderContents() | 15 | >>> print(karma.renderContents()) |
3028 | 16 | 138 | 16 | 138 |
3029 | 17 | 17 | ||
3030 | 18 | The total karma points is also a link to the person's karma summary page. | 18 | The total karma points is also a link to the person's karma summary page. |
3031 | 19 | 19 | ||
3032 | 20 | >>> anon_browser.getLink('138').click() | 20 | >>> anon_browser.getLink('138').click() |
3034 | 21 | >>> print anon_browser.title | 21 | >>> print(anon_browser.title) |
3035 | 22 | Karma : Sample Person | 22 | Karma : Sample Person |
3036 | 23 | 23 | ||
3037 | 24 | Any user can see the categories that a user has earned karma in. | 24 | Any user can see the categories that a user has earned karma in. |
3038 | 25 | 25 | ||
3039 | 26 | >>> content = find_main_content(anon_browser.contents) | 26 | >>> content = find_main_content(anon_browser.contents) |
3040 | 27 | >>> for row in find_tag_by_id(content, 'karmapoints').findAll('tr'): | 27 | >>> for row in find_tag_by_id(content, 'karmapoints').findAll('tr'): |
3042 | 28 | ... print extract_text(row) | 28 | ... print(extract_text(row)) |
3043 | 29 | Bug Management 94 | 29 | Bug Management 94 |
3044 | 30 | Specification Tracking 44 | 30 | Specification Tracking 44 |
3045 | 31 | 31 | ||
3046 | 32 | Any user can see that a user has latest actions. | 32 | Any user can see that a user has latest actions. |
3047 | 33 | 33 | ||
3048 | 34 | >>> for row in find_tag_by_id(content, 'karmaactions').findAll('tr'): | 34 | >>> for row in find_tag_by_id(content, 'karmaactions').findAll('tr'): |
3050 | 35 | ... print extract_text(row) | 35 | ... print(extract_text(row)) |
3051 | 36 | Date Action | 36 | Date Action |
3052 | 37 | 2001-11-02 Registered Specification | 37 | 2001-11-02 Registered Specification |
3053 | 38 | 2001-11-02 Registered Specification | 38 | 2001-11-02 Registered Specification |
3054 | @@ -43,7 +43,7 @@ The karma page can also show any user that a user has never earned karma. | |||
3055 | 43 | 43 | ||
3056 | 44 | >>> anon_browser.open('http://launchpad.test/~salgado/+karma') | 44 | >>> anon_browser.open('http://launchpad.test/~salgado/+karma') |
3057 | 45 | >>> content = find_main_content(anon_browser.contents) | 45 | >>> content = find_main_content(anon_browser.contents) |
3059 | 46 | >>> print extract_text(find_tag_by_id(content, 'no-karma')) | 46 | >>> print(extract_text(find_tag_by_id(content, 'no-karma'))) |
3060 | 47 | No karma has yet been assigned to Guilherme Salgado. Karma is updated | 47 | No karma has yet been assigned to Guilherme Salgado. Karma is updated |
3061 | 48 | daily. | 48 | daily. |
3062 | 49 | 49 | ||
3063 | @@ -52,10 +52,10 @@ a that user's last karma actions | |||
3064 | 52 | 52 | ||
3065 | 53 | >>> anon_browser.open('http://launchpad.test/~karl/+karma') | 53 | >>> anon_browser.open('http://launchpad.test/~karl/+karma') |
3066 | 54 | >>> content = find_main_content(anon_browser.contents) | 54 | >>> content = find_main_content(anon_browser.contents) |
3068 | 55 | >>> print extract_text(find_tag_by_id(content, 'no-karma')) | 55 | >>> print(extract_text(find_tag_by_id(content, 'no-karma'))) |
3069 | 56 | Karl Tilbury's karma has expired. | 56 | Karl Tilbury's karma has expired. |
3070 | 57 | 57 | ||
3071 | 58 | >>> for row in find_tag_by_id(content, 'karmaactions').findAll('tr'): | 58 | >>> for row in find_tag_by_id(content, 'karmaactions').findAll('tr'): |
3073 | 59 | ... print extract_text(row) | 59 | ... print(extract_text(row)) |
3074 | 60 | Date Action | 60 | Date Action |
3075 | 61 | 2001-08-09 New Bug Filed | 61 | 2001-08-09 New Bug Filed |
3076 | diff --git a/lib/lp/registry/stories/person/xx-person-projects.txt b/lib/lp/registry/stories/person/xx-person-projects.txt | |||
3077 | index ea1e800..89a323c 100644 | |||
3078 | --- a/lib/lp/registry/stories/person/xx-person-projects.txt | |||
3079 | +++ b/lib/lp/registry/stories/person/xx-person-projects.txt | |||
3080 | @@ -8,7 +8,7 @@ team. | |||
3081 | 8 | >>> related_projects = find_tag_by_id( | 8 | >>> related_projects = find_tag_by_id( |
3082 | 9 | ... anon_browser.contents, 'portlet-related-projects') | 9 | ... anon_browser.contents, 'portlet-related-projects') |
3083 | 10 | >>> for tr in related_projects.findAll('tr'): | 10 | >>> for tr in related_projects.findAll('tr'): |
3085 | 11 | ... print extract_text(tr) | 11 | ... print(extract_text(tr)) |
3086 | 12 | Ubuntu | 12 | Ubuntu |
3087 | 13 | ubuntutest | 13 | ubuntutest |
3088 | 14 | Tomcat | 14 | Tomcat |
3089 | @@ -16,12 +16,12 @@ team. | |||
3090 | 16 | The +related-projects page displays a table with project names. | 16 | The +related-projects page displays a table with project names. |
3091 | 17 | 17 | ||
3092 | 18 | >>> anon_browser.getLink('Show related projects').click() | 18 | >>> anon_browser.getLink('Show related projects').click() |
3094 | 19 | >>> print anon_browser.title | 19 | >>> print(anon_browser.title) |
3095 | 20 | Related projects : ...Ubuntu Team... team | 20 | Related projects : ...Ubuntu Team... team |
3096 | 21 | 21 | ||
3097 | 22 | >>> related_projects = find_tag_by_id( | 22 | >>> related_projects = find_tag_by_id( |
3098 | 23 | ... anon_browser.contents, 'related-projects') | 23 | ... anon_browser.contents, 'related-projects') |
3100 | 24 | >>> print extract_text(related_projects) | 24 | >>> print(extract_text(related_projects)) |
3101 | 25 | Name Owner Driver Bug Supervisor | 25 | Name Owner Driver Bug Supervisor |
3102 | 26 | Ubuntu yes no no | 26 | Ubuntu yes no no |
3103 | 27 | ubuntutest yes no no | 27 | ubuntutest yes no no |
3104 | @@ -32,16 +32,16 @@ A person's projects are accessible via a link on the 'Related packages' page. | |||
3105 | 32 | 32 | ||
3106 | 33 | >>> anon_browser.open('http://launchpad.test/~mark') | 33 | >>> anon_browser.open('http://launchpad.test/~mark') |
3107 | 34 | >>> anon_browser.getLink('Related packages').click() | 34 | >>> anon_browser.getLink('Related packages').click() |
3109 | 35 | >>> print anon_browser.url | 35 | >>> print(anon_browser.url) |
3110 | 36 | http://launchpad.test/~mark/+related-packages | 36 | http://launchpad.test/~mark/+related-packages |
3112 | 37 | >>> print anon_browser.title | 37 | >>> print(anon_browser.title) |
3113 | 38 | Related packages : Mark Shuttleworth | 38 | Related packages : Mark Shuttleworth |
3114 | 39 | 39 | ||
3115 | 40 | >>> anon_browser.open('http://launchpad.test/~mark') | 40 | >>> anon_browser.open('http://launchpad.test/~mark') |
3116 | 41 | >>> anon_browser.getLink('Related projects').click() | 41 | >>> anon_browser.getLink('Related projects').click() |
3117 | 42 | >>> related_projects = find_tag_by_id( | 42 | >>> related_projects = find_tag_by_id( |
3118 | 43 | ... anon_browser.contents, 'related-projects') | 43 | ... anon_browser.contents, 'related-projects') |
3120 | 44 | >>> print extract_text(related_projects) | 44 | >>> print(extract_text(related_projects)) |
3121 | 45 | Name Owner Driver Bug Supervisor | 45 | Name Owner Driver Bug Supervisor |
3122 | 46 | Debian yes no no | 46 | Debian yes no no |
3123 | 47 | Gentoo yes no no | 47 | Gentoo yes no no |
3124 | diff --git a/lib/lp/registry/stories/person/xx-person-rdf.txt b/lib/lp/registry/stories/person/xx-person-rdf.txt | |||
3125 | index 849853f..fa390ab 100644 | |||
3126 | --- a/lib/lp/registry/stories/person/xx-person-rdf.txt | |||
3127 | +++ b/lib/lp/registry/stories/person/xx-person-rdf.txt | |||
3128 | @@ -10,7 +10,7 @@ We export FOAF RDF metadata from the /~Person.name/+index document. | |||
3129 | 10 | >>> anon_browser.open("http://launchpad.test/~name16") | 10 | >>> anon_browser.open("http://launchpad.test/~name16") |
3130 | 11 | >>> strainer = SoupStrainer(['link'], {'type': ['application/rdf+xml']}) | 11 | >>> strainer = SoupStrainer(['link'], {'type': ['application/rdf+xml']}) |
3131 | 12 | >>> soup = BeautifulSoup(anon_browser.contents, parse_only=strainer) | 12 | >>> soup = BeautifulSoup(anon_browser.contents, parse_only=strainer) |
3133 | 13 | >>> print soup.renderContents() | 13 | >>> print(soup.renderContents()) |
3134 | 14 | <link href="+rdf" rel="meta" title="FOAF" type="application/rdf+xml"/> | 14 | <link href="+rdf" rel="meta" title="FOAF" type="application/rdf+xml"/> |
3135 | 15 | 15 | ||
3136 | 16 | 16 | ||
3137 | @@ -21,7 +21,7 @@ And this is what the FOAF document for an individual actually looks | |||
3138 | 21 | like. It includes GPG information, if the user has any. | 21 | like. It includes GPG information, if the user has any. |
3139 | 22 | 22 | ||
3140 | 23 | >>> anon_browser.open("http://launchpad.test/~name16/+rdf") | 23 | >>> anon_browser.open("http://launchpad.test/~name16/+rdf") |
3142 | 24 | >>> print anon_browser.contents | 24 | >>> print(anon_browser.contents) |
3143 | 25 | <?xml version="1.0"...?> | 25 | <?xml version="1.0"...?> |
3144 | 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#" |
3145 | 27 | xmlns:foaf="http://xmlns.com/foaf/0.1/" | 27 | xmlns:foaf="http://xmlns.com/foaf/0.1/" |
3146 | @@ -45,7 +45,7 @@ like. It includes GPG information, if the user has any. | |||
3147 | 45 | It also includes SSH keys: | 45 | It also includes SSH keys: |
3148 | 46 | 46 | ||
3149 | 47 | >>> anon_browser.open("http://launchpad.test/~name12/+rdf") | 47 | >>> anon_browser.open("http://launchpad.test/~name12/+rdf") |
3151 | 48 | >>> print anon_browser.contents | 48 | >>> print(anon_browser.contents) |
3152 | 49 | <?xml version="1.0"...?> | 49 | <?xml version="1.0"...?> |
3153 | 50 | ... | 50 | ... |
3154 | 51 | <foaf:name>Sample Person</foaf:name> | 51 | <foaf:name>Sample Person</foaf:name> |
3155 | @@ -57,7 +57,7 @@ And it's valid XML and RDF: | |||
3156 | 57 | 57 | ||
3157 | 58 | >>> from xml.dom.minidom import parseString | 58 | >>> from xml.dom.minidom import parseString |
3158 | 59 | >>> document = parseString(str(anon_browser.contents)) | 59 | >>> document = parseString(str(anon_browser.contents)) |
3160 | 60 | >>> print document.documentElement.nodeName | 60 | >>> print(document.documentElement.nodeName) |
3161 | 61 | rdf:RDF | 61 | rdf:RDF |
3162 | 62 | 62 | ||
3163 | 63 | 63 | ||
3164 | @@ -78,7 +78,7 @@ Now, generate the RDF itself: | |||
3165 | 78 | 78 | ||
3166 | 79 | >>> from lp.services.helpers import backslashreplace | 79 | >>> from lp.services.helpers import backslashreplace |
3167 | 80 | >>> anon_browser.open("http://launchpad.test/~testing-spanish-team/+rdf") | 80 | >>> anon_browser.open("http://launchpad.test/~testing-spanish-team/+rdf") |
3169 | 81 | >>> print backslashreplace(anon_browser.contents) | 81 | >>> print(backslashreplace(anon_browser.contents)) |
3170 | 82 | <?xml version="1.0"...?> | 82 | <?xml version="1.0"...?> |
3171 | 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#" |
3172 | 84 | xmlns:foaf="http://xmlns.com/foaf/0.1/" | 84 | xmlns:foaf="http://xmlns.com/foaf/0.1/" |
3173 | @@ -118,7 +118,7 @@ present: | |||
3174 | 118 | 118 | ||
3175 | 119 | And nothing about them is rendered at all: | 119 | And nothing about them is rendered at all: |
3176 | 120 | 120 | ||
3178 | 121 | >>> print anon_browser.contents | 121 | >>> print(anon_browser.contents) |
3179 | 122 | <?xml version="1.0"...?> | 122 | <?xml version="1.0"...?> |
3180 | 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#" |
3181 | 124 | xmlns:foaf="http://xmlns.com/foaf/0.1/" | 124 | xmlns:foaf="http://xmlns.com/foaf/0.1/" |
3182 | diff --git a/lib/lp/registry/stories/person/xx-person-subscriptions.txt b/lib/lp/registry/stories/person/xx-person-subscriptions.txt | |||
3183 | index 669d940..8546cb1 100644 | |||
3184 | --- a/lib/lp/registry/stories/person/xx-person-subscriptions.txt | |||
3185 | +++ b/lib/lp/registry/stories/person/xx-person-subscriptions.txt | |||
3186 | @@ -8,7 +8,7 @@ Any user can view the direct subscriptions that a person or team has to | |||
3187 | 8 | blueprints, branches, bugs, merge proposals and questions. | 8 | blueprints, branches, bugs, merge proposals and questions. |
3188 | 9 | 9 | ||
3189 | 10 | >>> anon_browser.open('http://launchpad.test/~ubuntu-team/+subscriptions') | 10 | >>> anon_browser.open('http://launchpad.test/~ubuntu-team/+subscriptions') |
3191 | 11 | >>> print anon_browser.title | 11 | >>> print(anon_browser.title) |
3192 | 12 | Subscriptions : Bugs : āUbuntu Teamā team | 12 | Subscriptions : Bugs : āUbuntu Teamā team |
3193 | 13 | 13 | ||
3194 | 14 | The user can see that the Ubuntu Team does not have any direct bug | 14 | The user can see that the Ubuntu Team does not have any direct bug |
3195 | @@ -39,8 +39,8 @@ Any user can see Webster's bug subscriptions. The bug subscriptions table | |||
3196 | 39 | includes the bug number, title and location. | 39 | includes the bug number, title and location. |
3197 | 40 | 40 | ||
3198 | 41 | >>> anon_browser.open('http://launchpad.test/~webster/+subscriptions') | 41 | >>> anon_browser.open('http://launchpad.test/~webster/+subscriptions') |
3201 | 42 | >>> print extract_text(find_tag_by_id( | 42 | >>> print(extract_text(find_tag_by_id( |
3202 | 43 | ... anon_browser.contents, 'bug_subscriptions')) | 43 | ... anon_browser.contents, 'bug_subscriptions'))) |
3203 | 44 | Summary | 44 | Summary |
3204 | 45 | In | 45 | In |
3205 | 46 | ... | 46 | ... |
3206 | @@ -77,7 +77,7 @@ subscribed to the bug. They click cancel which takes them back to their | |||
3207 | 77 | 77 | ||
3208 | 78 | >>> cancel_link = subscriber_browser.getLink('Cancel') | 78 | >>> cancel_link = subscriber_browser.getLink('Cancel') |
3209 | 79 | >>> cancel_link.click() | 79 | >>> cancel_link.click() |
3211 | 80 | >>> print subscriber_browser.title | 80 | >>> print(subscriber_browser.title) |
3212 | 81 | Subscriptions : Bugs : Webster | 81 | Subscriptions : Bugs : Webster |
3213 | 82 | 82 | ||
3214 | 83 | They choose to unsubscribe from the bug about Affluenza. | 83 | They choose to unsubscribe from the bug about Affluenza. |
3215 | @@ -87,7 +87,7 @@ They choose to unsubscribe from the bug about Affluenza. | |||
3216 | 87 | >>> subscriber_browser.getControl( | 87 | >>> subscriber_browser.getControl( |
3217 | 88 | ... "unsubscribe me from this bug").selected = True | 88 | ... "unsubscribe me from this bug").selected = True |
3218 | 89 | >>> subscriber_browser.getControl("Continue").click() | 89 | >>> subscriber_browser.getControl("Continue").click() |
3220 | 90 | >>> print subscriber_browser.title | 90 | >>> print(subscriber_browser.title) |
3221 | 91 | Subscriptions : Bugs : Webster | 91 | Subscriptions : Bugs : Webster |
3222 | 92 | 92 | ||
3223 | 93 | Webster can see that the bug about Affluenza is no longer listed in their | 93 | Webster can see that the bug about Affluenza is no longer listed in their |
3224 | @@ -95,8 +95,8 @@ direct bug subscriptions. | |||
3225 | 95 | 95 | ||
3226 | 96 | >>> subscriber_browser.open( | 96 | >>> subscriber_browser.open( |
3227 | 97 | ... 'http://bugs.launchpad.test/~webster/+subscriptions') | 97 | ... 'http://bugs.launchpad.test/~webster/+subscriptions') |
3230 | 98 | >>> print extract_text(find_tag_by_id( | 98 | >>> print(extract_text(find_tag_by_id( |
3231 | 99 | ... subscriber_browser.contents, 'bug_subscriptions')) | 99 | ... subscriber_browser.contents, 'bug_subscriptions'))) |
3232 | 100 | Summary | 100 | Summary |
3233 | 101 | In | 101 | In |
3234 | 102 | ... | 102 | ... |
3235 | @@ -118,11 +118,11 @@ Webster chooses to review the subscriptions for their team America. | |||
3236 | 118 | 118 | ||
3237 | 119 | >>> subscriber_browser.open( | 119 | >>> subscriber_browser.open( |
3238 | 120 | ... 'http://bugs.launchpad.test/~america/+subscriptions') | 120 | ... 'http://bugs.launchpad.test/~america/+subscriptions') |
3240 | 121 | >>> print subscriber_browser.title | 121 | >>> print(subscriber_browser.title) |
3241 | 122 | Subscriptions : Bugs ... | 122 | Subscriptions : Bugs ... |
3242 | 123 | 123 | ||
3245 | 124 | >>> print extract_text(find_tag_by_id( | 124 | >>> print(extract_text(find_tag_by_id( |
3246 | 125 | ... subscriber_browser.contents, 'bug_subscriptions')) | 125 | ... subscriber_browser.contents, 'bug_subscriptions'))) |
3247 | 126 | Summary | 126 | Summary |
3248 | 127 | In | 127 | In |
3249 | 128 | ... | 128 | ... |
3250 | @@ -133,8 +133,8 @@ Webster now chooses to unsubscribe team America from the bug about Scofflaw. | |||
3251 | 133 | 133 | ||
3252 | 134 | >>> subscriber_browser.getLink(id='unsubscribe-subscriber-%s' % | 134 | >>> subscriber_browser.getLink(id='unsubscribe-subscriber-%s' % |
3253 | 135 | ... team.id).click() | 135 | ... team.id).click() |
3256 | 136 | >>> print extract_text(find_tags_by_class( | 136 | >>> print(extract_text(find_tags_by_class( |
3257 | 137 | ... subscriber_browser.contents, 'value')[0]) | 137 | ... subscriber_browser.contents, 'value')[0])) |
3258 | 138 | subscribe me to this bug, or | 138 | subscribe me to this bug, or |
3259 | 139 | unsubscribe America from this bug. | 139 | unsubscribe America from this bug. |
3260 | 140 | 140 | ||
3261 | @@ -171,9 +171,9 @@ followed by a link to edit the subscription. | |||
3262 | 171 | ... admin_browser.contents, 'structural-subscriptions') | 171 | ... admin_browser.contents, 'structural-subscriptions') |
3263 | 172 | >>> for subscription in subscriptions.findAll("li"): | 172 | >>> for subscription in subscriptions.findAll("li"): |
3264 | 173 | ... structure_link, modify_link = subscription.findAll("a")[:2] | 173 | ... structure_link, modify_link = subscription.findAll("a")[:2] |
3268 | 174 | ... print "%s <%s>" % ( | 174 | ... print("%s <%s>" % ( |
3269 | 175 | ... extract_text(structure_link), structure_link.get("href")) | 175 | ... extract_text(structure_link), structure_link.get("href"))) |
3270 | 176 | ... print "--> %s" % modify_link.get("href") | 176 | ... print("--> %s" % modify_link.get("href")) |
3271 | 177 | mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox> | 177 | mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox> |
3272 | 178 | --> /ubuntu/+source/mozilla-firefox/+subscribe | 178 | --> /ubuntu/+source/mozilla-firefox/+subscribe |
3273 | 179 | pmount in Ubuntu </ubuntu/+source/pmount> | 179 | pmount in Ubuntu </ubuntu/+source/pmount> |
3274 | @@ -188,8 +188,8 @@ permission to modify those subscriptions. | |||
3275 | 188 | ... subscriber_browser.contents, 'structural-subscriptions') | 188 | ... subscriber_browser.contents, 'structural-subscriptions') |
3276 | 189 | >>> for subscription in subscriptions.findAll("li"): | 189 | >>> for subscription in subscriptions.findAll("li"): |
3277 | 190 | ... structure_link = subscription.find("a") | 190 | ... structure_link = subscription.find("a") |
3280 | 191 | ... print "%s <%s>" % ( | 191 | ... print("%s <%s>" % ( |
3281 | 192 | ... extract_text(structure_link), structure_link.get("href")) | 192 | ... extract_text(structure_link), structure_link.get("href"))) |
3282 | 193 | mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox> | 193 | mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox> |
3283 | 194 | pmount in Ubuntu </ubuntu/+source/pmount> | 194 | pmount in Ubuntu </ubuntu/+source/pmount> |
3284 | 195 | 195 | ||
3285 | @@ -204,8 +204,8 @@ structural subscriptions. | |||
3286 | 204 | 204 | ||
3287 | 205 | >>> subscriber_browser.open( | 205 | >>> subscriber_browser.open( |
3288 | 206 | ... "http://launchpad.test/people/+me/+structural-subscriptions") | 206 | ... "http://launchpad.test/people/+me/+structural-subscriptions") |
3291 | 207 | >>> print extract_text(find_tag_by_id( | 207 | >>> print(extract_text(find_tag_by_id( |
3292 | 208 | ... subscriber_browser.contents, "structural-subscriptions")) | 208 | ... subscriber_browser.contents, "structural-subscriptions"))) |
3293 | 209 | Webster does not have any structural subscriptions. | 209 | Webster does not have any structural subscriptions. |
3294 | 210 | 210 | ||
3295 | 211 | 211 | ||
3296 | @@ -222,14 +222,14 @@ subscription filter. | |||
3297 | 222 | ... browser.contents, 'structural-subscriptions') | 222 | ... browser.contents, 'structural-subscriptions') |
3298 | 223 | ... for subscription in subscriptions.findAll("li"): | 223 | ... for subscription in subscriptions.findAll("li"): |
3299 | 224 | ... structure_link = subscription.find("a") | 224 | ... structure_link = subscription.find("a") |
3301 | 225 | ... print extract_text(structure_link) | 225 | ... print(extract_text(structure_link)) |
3302 | 226 | ... create_text = subscription.find(text=re.compile("Create")) | 226 | ... create_text = subscription.find(text=re.compile("Create")) |
3303 | 227 | ... if create_text is None: | 227 | ... if create_text is None: |
3305 | 228 | ... print "* No create link." | 228 | ... print("* No create link.") |
3306 | 229 | ... else: | 229 | ... else: |
3308 | 230 | ... print "* %s --> %s" % ( | 230 | ... print("* %s --> %s" % ( |
3309 | 231 | ... create_text.strip(), | 231 | ... create_text.strip(), |
3311 | 232 | ... create_text.parent.get("href")) | 232 | ... create_text.parent.get("href"))) |
3312 | 233 | 233 | ||
3313 | 234 | >>> admin_browser.open( | 234 | >>> admin_browser.open( |
3314 | 235 | ... "http://launchpad.test/people/+me/+structural-subscriptions") | 235 | ... "http://launchpad.test/people/+me/+structural-subscriptions") |
3315 | @@ -273,9 +273,9 @@ filters are shown with a message stating that there is no filtering. | |||
3316 | 273 | ... subscriptions = find_tag_by_id( | 273 | ... subscriptions = find_tag_by_id( |
3317 | 274 | ... nigel_browser.contents, 'structural-subscriptions') | 274 | ... nigel_browser.contents, 'structural-subscriptions') |
3318 | 275 | ... for subscription in subscriptions.findAll("li"): | 275 | ... for subscription in subscriptions.findAll("li"): |
3320 | 276 | ... print extract_text(subscription.p) | 276 | ... print(extract_text(subscription.p)) |
3321 | 277 | ... if subscription.dl is not None: | 277 | ... if subscription.dl is not None: |
3323 | 278 | ... print extract_text(subscription.dl) | 278 | ... print(extract_text(subscription.dl)) |
3324 | 279 | 279 | ||
3325 | 280 | >>> show_nigels_subscriptions() | 280 | >>> show_nigels_subscriptions() |
3326 | 281 | Bug mail for Nigel about Scofflaw is filtered; | 281 | Bug mail for Nigel about Scofflaw is filtered; |
3327 | diff --git a/lib/lp/registry/stories/person/xx-person-working-on.txt b/lib/lp/registry/stories/person/xx-person-working-on.txt | |||
3328 | index 651e90b..fe7041f 100644 | |||
3329 | --- a/lib/lp/registry/stories/person/xx-person-working-on.txt | |||
3330 | +++ b/lib/lp/registry/stories/person/xx-person-working-on.txt | |||
3331 | @@ -31,8 +31,8 @@ displayed there. | |||
3332 | 31 | >>> logout() | 31 | >>> logout() |
3333 | 32 | 32 | ||
3334 | 33 | >>> anon_browser.open(new_person_url) | 33 | >>> anon_browser.open(new_person_url) |
3337 | 34 | >>> print extract_text( | 34 | >>> print(extract_text( |
3338 | 35 | ... find_tag_by_id(anon_browser.contents, 'working-on')) | 35 | ... find_tag_by_id(anon_browser.contents, 'working-on'))) |
3339 | 36 | All bugs in progress | 36 | All bugs in progress |
3340 | 37 | Assigned bugs | 37 | Assigned bugs |
3341 | 38 | ... | 38 | ... |
3342 | diff --git a/lib/lp/registry/stories/person/xx-user-to-user.txt b/lib/lp/registry/stories/person/xx-user-to-user.txt | |||
3343 | index db92486..c035e1d 100644 | |||
3344 | --- a/lib/lp/registry/stories/person/xx-user-to-user.txt | |||
3345 | +++ b/lib/lp/registry/stories/person/xx-user-to-user.txt | |||
3346 | @@ -11,13 +11,13 @@ wants to contact Salgado. | |||
3347 | 11 | 11 | ||
3348 | 12 | >>> user_browser.open('http://launchpad.test/~salgado') | 12 | >>> user_browser.open('http://launchpad.test/~salgado') |
3349 | 13 | >>> user_browser.getLink('Contact this user').click() | 13 | >>> user_browser.getLink('Contact this user').click() |
3351 | 14 | >>> print user_browser.title | 14 | >>> print(user_browser.title) |
3352 | 15 | Contact this user : Guilherme Salgado | 15 | Contact this user : Guilherme Salgado |
3353 | 16 | 16 | ||
3354 | 17 | >>> user_browser.getControl('Subject').value = 'Hi Salgado' | 17 | >>> user_browser.getControl('Subject').value = 'Hi Salgado' |
3355 | 18 | >>> user_browser.getControl('Message').value = 'Just saying hello' | 18 | >>> user_browser.getControl('Message').value = 'Just saying hello' |
3356 | 19 | >>> user_browser.getControl('Send').click() | 19 | >>> user_browser.getControl('Send').click() |
3358 | 20 | >>> print user_browser.title | 20 | >>> print(user_browser.title) |
3359 | 21 | Guilherme Salgado in Launchpad | 21 | Guilherme Salgado in Launchpad |
3360 | 22 | 22 | ||
3361 | 23 | Salgado receives the email message from No Priv. | 23 | Salgado receives the email message from No Priv. |
3362 | @@ -25,13 +25,13 @@ Salgado receives the email message from No Priv. | |||
3363 | 25 | >>> len(stub.test_emails) | 25 | >>> len(stub.test_emails) |
3364 | 26 | 1 | 26 | 1 |
3365 | 27 | >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop() | 27 | >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop() |
3367 | 28 | >>> print from_addr | 28 | >>> print(from_addr) |
3368 | 29 | bounces@canonical.com | 29 | bounces@canonical.com |
3369 | 30 | >>> len(to_addrs) | 30 | >>> len(to_addrs) |
3370 | 31 | 1 | 31 | 1 |
3372 | 32 | >>> print to_addrs[0] | 32 | >>> print(to_addrs[0]) |
3373 | 33 | Guilherme Salgado <guilherme.salgado@canonical.com> | 33 | Guilherme Salgado <guilherme.salgado@canonical.com> |
3375 | 34 | >>> print raw_msg | 34 | >>> print(raw_msg) |
3376 | 35 | Content-Type: text/plain; charset="us-ascii" | 35 | Content-Type: text/plain; charset="us-ascii" |
3377 | 36 | MIME-Version: 1.0 | 36 | MIME-Version: 1.0 |
3378 | 37 | Content-Transfer-Encoding: 7bit | 37 | Content-Transfer-Encoding: 7bit |
3379 | @@ -47,7 +47,7 @@ mind. | |||
3380 | 47 | >>> user_browser.getControl('Subject').value = 'Hi Salgado' | 47 | >>> user_browser.getControl('Subject').value = 'Hi Salgado' |
3381 | 48 | >>> user_browser.getControl('Message').value = 'Hello again' | 48 | >>> user_browser.getControl('Message').value = 'Hello again' |
3382 | 49 | >>> user_browser.getLink('Cancel').click() | 49 | >>> user_browser.getLink('Cancel').click() |
3384 | 50 | >>> print user_browser.title | 50 | >>> print(user_browser.title) |
3385 | 51 | Guilherme Salgado in Launchpad | 51 | Guilherme Salgado in Launchpad |
3386 | 52 | 52 | ||
3387 | 53 | 53 | ||
3388 | @@ -63,7 +63,7 @@ Sample Person has multiple registered and validated email addresses. | |||
3389 | 63 | 63 | ||
3390 | 64 | By default, Sample can use their preferred email address. | 64 | By default, Sample can use their preferred email address. |
3391 | 65 | 65 | ||
3393 | 66 | >>> print browser.getControl('From').value | 66 | >>> print(browser.getControl('From').value) |
3394 | 67 | ['test@canonical.com'] | 67 | ['test@canonical.com'] |
3395 | 68 | 68 | ||
3396 | 69 | But they don't have to use their preferred address; they can use one of | 69 | But they don't have to use their preferred address; they can use one of |
3397 | @@ -74,7 +74,7 @@ their alternative addresses. | |||
3398 | 74 | >>> browser.getControl('Send').click() | 74 | >>> browser.getControl('Send').click() |
3399 | 75 | 75 | ||
3400 | 76 | >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop() | 76 | >>> from_addr, to_addrs, raw_msg = stub.test_emails.pop() |
3402 | 77 | >>> print raw_msg | 77 | >>> print(raw_msg) |
3403 | 78 | Content-Type: text/plain; charset="us-ascii" | 78 | Content-Type: text/plain; charset="us-ascii" |
3404 | 79 | MIME-Version: 1.0 | 79 | MIME-Version: 1.0 |
3405 | 80 | Content-Transfer-Encoding: 7bit | 80 | Content-Transfer-Encoding: 7bit |
3406 | diff --git a/lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt b/lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt | |||
3407 | index d2f0fb2..259de37 100644 | |||
3408 | --- a/lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt | |||
3409 | +++ b/lib/lp/registry/stories/pillar/xx-pillar-deactivation.txt | |||
3410 | @@ -65,12 +65,14 @@ But an administrator can still see them if they traverse directly, and | |||
3411 | 65 | they'll see an informative message. They can then reactivate them.. | 65 | they'll see an informative message. They can then reactivate them.. |
3412 | 66 | 66 | ||
3413 | 67 | >>> admin_browser.open('http://launchpad.test/firefox') | 67 | >>> admin_browser.open('http://launchpad.test/firefox') |
3415 | 68 | >>> print find_tag_by_id(admin_browser.contents, 'project-inactive').renderContents() | 68 | >>> print(find_tag_by_id( |
3416 | 69 | ... admin_browser.contents, 'project-inactive').renderContents()) | ||
3417 | 69 | This project is currently inactive... | 70 | This project is currently inactive... |
3418 | 70 | >>> toggleProject('firefox') | 71 | >>> toggleProject('firefox') |
3419 | 71 | 72 | ||
3420 | 72 | >>> admin_browser.open('http://launchpad.test/mozilla') | 73 | >>> admin_browser.open('http://launchpad.test/mozilla') |
3422 | 73 | >>> print find_tag_by_id(admin_browser.contents, 'project-inactive').renderContents() | 74 | >>> print(find_tag_by_id( |
3423 | 75 | ... admin_browser.contents, 'project-inactive').renderContents()) | ||
3424 | 74 | This project is currently inactive... | 76 | This project is currently inactive... |
3425 | 75 | >>> toggleProject('mozilla') | 77 | >>> toggleProject('mozilla') |
3426 | 76 | 78 | ||
3427 | @@ -80,12 +82,12 @@ And they are back to normal: | |||
3428 | 80 | >>> anon_browser.getLink(url='/firefox').click() | 82 | >>> anon_browser.getLink(url='/firefox').click() |
3429 | 81 | >>> anon_browser.title | 83 | >>> anon_browser.title |
3430 | 82 | 'Mozilla Firefox in Launchpad' | 84 | 'Mozilla Firefox in Launchpad' |
3432 | 83 | >>> print find_tag_by_id(anon_browser.contents, 'project-inactive') | 85 | >>> print(find_tag_by_id(anon_browser.contents, 'project-inactive')) |
3433 | 84 | None | 86 | None |
3434 | 85 | 87 | ||
3435 | 86 | >>> anon_browser.open('http://launchpad.test/projects/+index?text=mozilla') | 88 | >>> anon_browser.open('http://launchpad.test/projects/+index?text=mozilla') |
3436 | 87 | >>> anon_browser.getLink(url='/mozilla').click() | 89 | >>> anon_browser.getLink(url='/mozilla').click() |
3437 | 88 | >>> anon_browser.title | 90 | >>> anon_browser.title |
3438 | 89 | 'The Mozilla Project in Launchpad' | 91 | 'The Mozilla Project in Launchpad' |
3440 | 90 | >>> print find_tag_by_id(anon_browser.contents, 'project-inactive') | 92 | >>> print(find_tag_by_id(anon_browser.contents, 'project-inactive')) |
3441 | 91 | None | 93 | None |
3442 | diff --git a/lib/lp/registry/stories/pillar/xx-pillar-sprints.txt b/lib/lp/registry/stories/pillar/xx-pillar-sprints.txt | |||
3443 | index c5784e9..940c933 100644 | |||
3444 | --- a/lib/lp/registry/stories/pillar/xx-pillar-sprints.txt | |||
3445 | +++ b/lib/lp/registry/stories/pillar/xx-pillar-sprints.txt | |||
3446 | @@ -8,7 +8,7 @@ all events relevant to that pillar. | |||
3447 | 8 | ... maincontent = find_tag_by_id(contents, 'maincontent') | 8 | ... maincontent = find_tag_by_id(contents, 'maincontent') |
3448 | 9 | ... for link in maincontent.findAll('a'): | 9 | ... for link in maincontent.findAll('a'): |
3449 | 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: |
3451 | 11 | ... print link.renderContents() | 11 | ... print(link.renderContents()) |
3452 | 12 | 12 | ||
3453 | 13 | >>> anon_browser.open('http://launchpad.test/firefox/+sprints') | 13 | >>> anon_browser.open('http://launchpad.test/firefox/+sprints') |
3454 | 14 | >>> print_sprints(anon_browser.contents) | 14 | >>> print_sprints(anon_browser.contents) |
3455 | diff --git a/lib/lp/registry/stories/product/xx-launchpad-project-search.txt b/lib/lp/registry/stories/product/xx-launchpad-project-search.txt | |||
3456 | index 9e1b3b0..d1595e8 100644 | |||
3457 | --- a/lib/lp/registry/stories/product/xx-launchpad-project-search.txt | |||
3458 | +++ b/lib/lp/registry/stories/product/xx-launchpad-project-search.txt | |||
3459 | @@ -12,8 +12,8 @@ distributions. | |||
3460 | 12 | 12 | ||
3461 | 13 | The user is informed when no matches are found. | 13 | The user is informed when no matches are found. |
3462 | 14 | 14 | ||
3465 | 15 | >>> print extract_text( | 15 | >>> print(extract_text( |
3466 | 16 | ... find_tag_by_id(anon_browser.contents, 'no-matches')) | 16 | ... find_tag_by_id(anon_browser.contents, 'no-matches'))) |
3467 | 17 | No projects matching ...whizzbar... were found... | 17 | No projects matching ...whizzbar... were found... |
3468 | 18 | 18 | ||
3469 | 19 | Launchpad shows up to config.launchpad.default_batch_size results; if there | 19 | Launchpad shows up to config.launchpad.default_batch_size results; if there |
3470 | @@ -32,16 +32,16 @@ the user to refine their search. | |||
3471 | 32 | 'http://launchpad.test/projects/+index?text=ubuntu' | 32 | 'http://launchpad.test/projects/+index?text=ubuntu' |
3472 | 33 | 33 | ||
3473 | 34 | >>> content = find_main_content(anon_browser.contents) | 34 | >>> content = find_main_content(anon_browser.contents) |
3475 | 35 | >>> print extract_text(find_tag_by_id(content, 'search-summary')) | 35 | >>> print(extract_text(find_tag_by_id(content, 'search-summary'))) |
3476 | 36 | 6 projects found matching ...ubuntu..., showing the most relevant 5 | 36 | 6 projects found matching ...ubuntu..., showing the most relevant 5 |
3477 | 37 | 37 | ||
3479 | 38 | >>> print extract_text(find_tag_by_id(content, 'too-many-matches')) | 38 | >>> print(extract_text(find_tag_by_id(content, 'too-many-matches'))) |
3480 | 39 | More than 5 projects were found. | 39 | More than 5 projects were found. |
3481 | 40 | You can do another search with more relevant search terms. | 40 | You can do another search with more relevant search terms. |
3482 | 41 | 41 | ||
3483 | 42 | A lower search form is shown when there are matches. | 42 | A lower search form is shown when there are matches. |
3484 | 43 | 43 | ||
3486 | 44 | >>> print find_tag_by_id(content, 'project-search-lower').name | 44 | >>> print(find_tag_by_id(content, 'project-search-lower').name) |
3487 | 45 | form | 45 | form |
3488 | 46 | 46 | ||
3489 | 47 | The search results contain projects, project-groups, and distributions. | 47 | The search results contain projects, project-groups, and distributions. |
3490 | @@ -50,7 +50,7 @@ The search results contain projects, project-groups, and distributions. | |||
3491 | 50 | ... search_results = find_tag_by_id( | 50 | ... search_results = find_tag_by_id( |
3492 | 51 | ... abrowser.contents, 'search-results') | 51 | ... abrowser.contents, 'search-results') |
3493 | 52 | ... for tr in search_results.tbody('tr'): | 52 | ... for tr in search_results.tbody('tr'): |
3495 | 53 | ... print ' '.join(tr.td.a['class']), extract_text(tr.td.a) | 53 | ... print(' '.join(tr.td.a['class']), extract_text(tr.td.a)) |
3496 | 54 | >>> print_search_results(anon_browser) | 54 | >>> print_search_results(anon_browser) |
3497 | 55 | sprite distribution Ubuntu | 55 | sprite distribution Ubuntu |
3498 | 56 | sprite distribution ubuntutest | 56 | sprite distribution ubuntutest |
3499 | @@ -74,7 +74,7 @@ some terms and do another search. | |||
3500 | 74 | '' | 74 | '' |
3501 | 75 | >>> project_search.getControl('Search').click() | 75 | >>> project_search.getControl('Search').click() |
3502 | 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') |
3504 | 77 | >>> print empty_search.renderContents() | 77 | >>> print(empty_search.renderContents()) |
3505 | 78 | <BLANKLINE> | 78 | <BLANKLINE> |
3506 | 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. |
3507 | 80 | <BLANKLINE> | 80 | <BLANKLINE> |
3508 | @@ -93,10 +93,10 @@ A similar page is available for only searching project groups. | |||
3509 | 93 | >>> tags = find_tags_by_class( | 93 | >>> tags = find_tags_by_class( |
3510 | 94 | ... anon_browser.contents, "informational message") | 94 | ... anon_browser.contents, "informational message") |
3511 | 95 | >>> for tag in tags: | 95 | >>> for tag in tags: |
3513 | 96 | ... print tag.renderContents() | 96 | ... print(tag.renderContents()) |
3514 | 97 | 97 | ||
3515 | 98 | The search results contains only project-groups. | 98 | The search results contains only project-groups. |
3516 | 99 | 99 | ||
3519 | 100 | >>> print extract_text( | 100 | >>> print(extract_text( |
3520 | 101 | ... find_main_content(anon_browser.contents).findAll('p')[1]) | 101 | ... find_main_content(anon_browser.contents).findAll('p')[1])) |
3521 | 102 | 1 project group found matching ...gnome... | 102 | 1 project group found matching ...gnome... |
3522 | diff --git a/lib/lp/registry/stories/product/xx-product-add.txt b/lib/lp/registry/stories/product/xx-product-add.txt | |||
3523 | index b418979..2a861ca 100644 | |||
3524 | --- a/lib/lp/registry/stories/product/xx-product-add.txt | |||
3525 | +++ b/lib/lp/registry/stories/product/xx-product-add.txt | |||
3526 | @@ -6,30 +6,30 @@ either from the Launchpad home page or the projects home page. | |||
3527 | 6 | 6 | ||
3528 | 7 | >>> user_browser.open('http://launchpad.test') | 7 | >>> user_browser.open('http://launchpad.test') |
3529 | 8 | >>> user_browser.getLink('Register a project').click() | 8 | >>> user_browser.getLink('Register a project').click() |
3531 | 9 | >>> print user_browser.title | 9 | >>> print(user_browser.title) |
3532 | 10 | Register a project in Launchpad... | 10 | Register a project in Launchpad... |
3533 | 11 | 11 | ||
3534 | 12 | >>> user_browser.open('http://launchpad.test/projects') | 12 | >>> user_browser.open('http://launchpad.test/projects') |
3535 | 13 | >>> user_browser.getLink('Register a project').click() | 13 | >>> user_browser.getLink('Register a project').click() |
3537 | 14 | >>> print user_browser.title | 14 | >>> print(user_browser.title) |
3538 | 15 | Register a project in Launchpad... | 15 | Register a project in Launchpad... |
3539 | 16 | 16 | ||
3540 | 17 | The user can see links about things that are often assumed to be related to | 17 | The user can see links about things that are often assumed to be related to |
3541 | 18 | project registration. | 18 | project registration. |
3542 | 19 | 19 | ||
3544 | 20 | >>> print user_browser.getLink('Register a team').url | 20 | >>> print(user_browser.getLink('Register a team').url) |
3545 | 21 | https://help.launchpad.net/Teams | 21 | https://help.launchpad.net/Teams |
3546 | 22 | 22 | ||
3548 | 23 | >>> print user_browser.getLink('Activate a PPA').url | 23 | >>> print(user_browser.getLink('Activate a PPA').url) |
3549 | 24 | https://help.launchpad.net/Packaging/PPA | 24 | https://help.launchpad.net/Packaging/PPA |
3550 | 25 | 25 | ||
3552 | 26 | >>> print user_browser.getLink('Access your personal branches').url | 26 | >>> print(user_browser.getLink('Access your personal branches').url) |
3553 | 27 | https://help.launchpad.net/Code/PersonalBranches | 27 | https://help.launchpad.net/Code/PersonalBranches |
3554 | 28 | 28 | ||
3556 | 29 | >>> print user_browser.getLink('Translate a project').url | 29 | >>> print(user_browser.getLink('Translate a project').url) |
3557 | 30 | https://help.launchpad.net/Translations/YourProject | 30 | https://help.launchpad.net/Translations/YourProject |
3558 | 31 | 31 | ||
3560 | 32 | >>> print user_browser.getLink('Request a project group').url | 32 | >>> print(user_browser.getLink('Request a project group').url) |
3561 | 33 | https://help.launchpad.net/ProjectGroups | 33 | https://help.launchpad.net/ProjectGroups |
3562 | 34 | 34 | ||
3563 | 35 | 35 | ||
3564 | @@ -73,7 +73,7 @@ information correctly this time. | |||
3565 | 73 | The project is not yet created; instead, the project basics are successfully | 73 | The project is not yet created; instead, the project basics are successfully |
3566 | 74 | validated and the second step of the process is entered. | 74 | validated and the second step of the process is entered. |
3567 | 75 | 75 | ||
3569 | 76 | >>> print user_browser.title | 76 | >>> print(user_browser.title) |
3570 | 77 | Register a project in Launchpad... | 77 | Register a project in Launchpad... |
3571 | 78 | 78 | ||
3572 | 79 | 79 | ||
3573 | @@ -85,7 +85,7 @@ modify the project's URL. | |||
3574 | 85 | 85 | ||
3575 | 86 | >>> user_browser.getControl(name='field.name') | 86 | >>> user_browser.getControl(name='field.name') |
3576 | 87 | <Control name='field.name' type='hidden'> | 87 | <Control name='field.name' type='hidden'> |
3578 | 88 | >>> print user_browser.getControl(name='field.name').value | 88 | >>> print(user_browser.getControl(name='field.name').value) |
3579 | 89 | aardvark | 89 | aardvark |
3580 | 90 | 90 | ||
3581 | 91 | Sample Person is given the opportunity though to change the summary. | 91 | Sample Person is given the opportunity though to change the summary. |
3582 | @@ -97,30 +97,30 @@ They can also add a longer description. | |||
3583 | 97 | ... 'The desktop aardvark is an ornery thing.') | 97 | ... 'The desktop aardvark is an ornery thing.') |
3584 | 98 | >>> user_browser.getControl('Python Licence').click() | 98 | >>> user_browser.getControl('Python Licence').click() |
3585 | 99 | >>> user_browser.getControl('Complete Registration').click() | 99 | >>> user_browser.getControl('Complete Registration').click() |
3587 | 100 | >>> print user_browser.title | 100 | >>> print(user_browser.title) |
3588 | 101 | Aardvark Center in Launchpad | 101 | Aardvark Center in Launchpad |
3589 | 102 | 102 | ||
3590 | 103 | Let's ensure the summary and description are presented. | 103 | Let's ensure the summary and description are presented. |
3591 | 104 | 104 | ||
3592 | 105 | >>> summary = find_tags_by_class(user_browser.contents, | 105 | >>> summary = find_tags_by_class(user_browser.contents, |
3593 | 106 | ... 'summary', only_first=True) | 106 | ... 'summary', only_first=True) |
3595 | 107 | >>> print extract_text(summary) | 107 | >>> print(extract_text(summary)) |
3596 | 108 | Control pesky aardvarkian fnords | 108 | Control pesky aardvarkian fnords |
3597 | 109 | >>> desc = find_tags_by_class(user_browser.contents, | 109 | >>> desc = find_tags_by_class(user_browser.contents, |
3598 | 110 | ... 'description', only_first=True) | 110 | ... 'description', only_first=True) |
3600 | 111 | >>> print extract_text(desc) | 111 | >>> print(extract_text(desc)) |
3601 | 112 | The desktop aardvark is an ornery thing. | 112 | The desktop aardvark is an ornery thing. |
3602 | 113 | 113 | ||
3603 | 114 | Let's ensure the registrant and maintainer are listed correctly. | 114 | Let's ensure the registrant and maintainer are listed correctly. |
3604 | 115 | 115 | ||
3605 | 116 | >>> registrant = find_tag_by_id(user_browser.contents, | 116 | >>> registrant = find_tag_by_id(user_browser.contents, |
3606 | 117 | ... 'registration') | 117 | ... 'registration') |
3608 | 118 | >>> print extract_text(registrant) | 118 | >>> print(extract_text(registrant)) |
3609 | 119 | Registered...by...No Privileges Person... | 119 | Registered...by...No Privileges Person... |
3610 | 120 | 120 | ||
3611 | 121 | >>> maintainer = find_tag_by_id(user_browser.contents, | 121 | >>> maintainer = find_tag_by_id(user_browser.contents, |
3612 | 122 | ... 'owner') | 122 | ... 'owner') |
3614 | 123 | >>> print extract_text(maintainer) | 123 | >>> print(extract_text(maintainer)) |
3615 | 124 | Maintainer: No Privileges Person... | 124 | Maintainer: No Privileges Person... |
3616 | 125 | 125 | ||
3617 | 126 | 126 | ||
3618 | @@ -150,12 +150,12 @@ Registry Admins. | |||
3619 | 150 | 150 | ||
3620 | 151 | >>> registrant = find_tag_by_id(user_browser.contents, | 151 | >>> registrant = find_tag_by_id(user_browser.contents, |
3621 | 152 | ... 'registration') | 152 | ... 'registration') |
3623 | 153 | >>> print extract_text(registrant) | 153 | >>> print(extract_text(registrant)) |
3624 | 154 | Registered...by...No Privileges Person... | 154 | Registered...by...No Privileges Person... |
3625 | 155 | 155 | ||
3626 | 156 | >>> maintainer = find_tag_by_id(user_browser.contents, | 156 | >>> maintainer = find_tag_by_id(user_browser.contents, |
3627 | 157 | ... 'owner') | 157 | ... 'owner') |
3629 | 158 | >>> print extract_text(maintainer) | 158 | >>> print(extract_text(maintainer)) |
3630 | 159 | Maintainer: Registry Administrators... | 159 | Maintainer: Registry Administrators... |
3631 | 160 | 160 | ||
3632 | 161 | 161 | ||
3633 | @@ -167,7 +167,7 @@ Firefox. | |||
3634 | 167 | 167 | ||
3635 | 168 | >>> user_browser.open('http://launchpad.test') | 168 | >>> user_browser.open('http://launchpad.test') |
3636 | 169 | >>> user_browser.getLink('Register a project').click() | 169 | >>> user_browser.getLink('Register a project').click() |
3638 | 170 | >>> print user_browser.title | 170 | >>> print(user_browser.title) |
3639 | 171 | Register a project in Launchpad... | 171 | Register a project in Launchpad... |
3640 | 172 | 172 | ||
3641 | 173 | >>> user_browser.getControl('Name').value = 'Snowdog' | 173 | >>> user_browser.getControl('Name').value = 'Snowdog' |
3642 | @@ -183,7 +183,7 @@ Instead of registering their new project, Sample Person decides to participate | |||
3643 | 183 | in the Mozilla Project. | 183 | in the Mozilla Project. |
3644 | 184 | 184 | ||
3645 | 185 | >>> user_browser.getLink('The Mozilla Project').click() | 185 | >>> user_browser.getLink('The Mozilla Project').click() |
3647 | 186 | >>> print user_browser.title | 186 | >>> print(user_browser.title) |
3648 | 187 | The Mozilla Project in Launchpad | 187 | The Mozilla Project in Launchpad |
3649 | 188 | 188 | ||
3650 | 189 | 189 | ||
3651 | @@ -195,8 +195,8 @@ The project registration workflow used to get started at | |||
3652 | 195 | location at /projects/+new. | 195 | location at /projects/+new. |
3653 | 196 | 196 | ||
3654 | 197 | >>> user_browser.open('http://launchpad.test/projects/+new-guided') | 197 | >>> user_browser.open('http://launchpad.test/projects/+new-guided') |
3656 | 198 | >>> print user_browser.title | 198 | >>> print(user_browser.title) |
3657 | 199 | Register a project in Launchpad... | 199 | Register a project in Launchpad... |
3658 | 200 | 200 | ||
3660 | 201 | >>> print user_browser.url | 201 | >>> print(user_browser.url) |
3661 | 202 | http://launchpad.test/projects/+new | 202 | http://launchpad.test/projects/+new |
3662 | diff --git a/lib/lp/registry/stories/product/xx-product-code-trunk.txt b/lib/lp/registry/stories/product/xx-product-code-trunk.txt | |||
3663 | index 157bae2..04ba410 100644 | |||
3664 | --- a/lib/lp/registry/stories/product/xx-product-code-trunk.txt | |||
3665 | +++ b/lib/lp/registry/stories/product/xx-product-code-trunk.txt | |||
3666 | @@ -24,33 +24,33 @@ Make revisions for the branch so it has a codebrowse link. | |||
3667 | 24 | >>> def print_development_focus(browser): | 24 | >>> def print_development_focus(browser): |
3668 | 25 | ... """Print out the development focus part of the project info.""" | 25 | ... """Print out the development focus part of the project info.""" |
3669 | 26 | ... dev_focus = find_tag_by_id(browser.contents, 'development-focus') | 26 | ... dev_focus = find_tag_by_id(browser.contents, 'development-focus') |
3672 | 27 | ... print extract_text(dev_focus) | 27 | ... print(extract_text(dev_focus)) |
3673 | 28 | ... print "Links:" | 28 | ... print("Links:") |
3674 | 29 | ... for a in dev_focus.findAll('a'): | 29 | ... for a in dev_focus.findAll('a'): |
3675 | 30 | ... for content in a.contents: | 30 | ... for content in a.contents: |
3677 | 31 | ... print content | 31 | ... print(content) |
3678 | 32 | ... title = a.get('title', '') | 32 | ... title = a.get('title', '') |
3680 | 33 | ... print "%s (%s)" % (title, a['href']) | 33 | ... print("%s (%s)" % (title, a['href'])) |
3681 | 34 | >>> def print_code_trunk(browser): | 34 | >>> def print_code_trunk(browser): |
3682 | 35 | ... """Print out code trunk part of the project info.""" | 35 | ... """Print out code trunk part of the project info.""" |
3683 | 36 | ... project_info = find_tag_by_id(browser.contents, 'code-info') | 36 | ... project_info = find_tag_by_id(browser.contents, 'code-info') |
3684 | 37 | ... code_trunk = project_info.find(attrs={'id':'code-trunk'}) | 37 | ... code_trunk = project_info.find(attrs={'id':'code-trunk'}) |
3685 | 38 | ... try: | 38 | ... try: |
3687 | 39 | ... print extract_text(code_trunk) | 39 | ... print(extract_text(code_trunk)) |
3688 | 40 | ... except TypeError: | 40 | ... except TypeError: |
3689 | 41 | ... return | 41 | ... return |
3691 | 42 | ... print "Links:" | 42 | ... print("Links:") |
3692 | 43 | ... for a in code_trunk.findAll('a'): | 43 | ... for a in code_trunk.findAll('a'): |
3693 | 44 | ... for content in a.contents: | 44 | ... for content in a.contents: |
3695 | 45 | ... print content | 45 | ... print(content) |
3696 | 46 | ... title = a.get('title', '') | 46 | ... title = a.get('title', '') |
3698 | 47 | ... print "%s (%s)" % (title, a['href']) | 47 | ... print("%s (%s)" % (title, a['href'])) |
3699 | 48 | >>> def print_involvement_portlet(browser): | 48 | >>> def print_involvement_portlet(browser): |
3700 | 49 | ... involvement = find_tag_by_id(browser.contents, 'involvement') | 49 | ... involvement = find_tag_by_id(browser.contents, 'involvement') |
3701 | 50 | ... for a in involvement.findAll('a'): | 50 | ... for a in involvement.findAll('a'): |
3702 | 51 | ... for content in a.contents: | 51 | ... for content in a.contents: |
3705 | 52 | ... print content | 52 | ... print(content) |
3706 | 53 | ... print a['href'] | 53 | ... print(a['href']) |
3707 | 54 | 54 | ||
3708 | 55 | 55 | ||
3709 | 56 | Projects without development focus branches | 56 | Projects without development focus branches |
3710 | 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 | |||
3711 | index 734d465..66bccea 100644 | |||
3712 | --- a/lib/lp/registry/stories/product/xx-product-edit-sourceforge-project.txt | |||
3713 | +++ b/lib/lp/registry/stories/product/xx-product-edit-sourceforge-project.txt | |||
3714 | @@ -6,7 +6,7 @@ The setting of the SourceForge project is constrained. | |||
3715 | 6 | ... admin_browser.open('http://launchpad.test/firefox/+edit') | 6 | ... admin_browser.open('http://launchpad.test/firefox/+edit') |
3716 | 7 | ... admin_browser.getControl('Sourceforge Project').value = name | 7 | ... admin_browser.getControl('Sourceforge Project').value = name |
3717 | 8 | ... admin_browser.getControl('Change').click() | 8 | ... admin_browser.getControl('Change').click() |
3719 | 9 | ... print admin_browser.url | 9 | ... print(admin_browser.url) |
3720 | 10 | ... print_feedback_messages(admin_browser.contents) | 10 | ... print_feedback_messages(admin_browser.contents) |
3721 | 11 | 11 | ||
3722 | 12 | >>> set_sourceforge_project('1234') | 12 | >>> set_sourceforge_project('1234') |
3723 | diff --git a/lib/lp/registry/stories/product/xx-product-edit.txt b/lib/lp/registry/stories/product/xx-product-edit.txt | |||
3724 | index 8f82dd3..1b6a7c6 100644 | |||
3725 | --- a/lib/lp/registry/stories/product/xx-product-edit.txt | |||
3726 | +++ b/lib/lp/registry/stories/product/xx-product-edit.txt | |||
3727 | @@ -7,10 +7,10 @@ Page to edit a product - does the page load as the product owner? | |||
3728 | 7 | >>> browser = setupBrowser(auth='Basic test@canonical.com:test') | 7 | >>> browser = setupBrowser(auth='Basic test@canonical.com:test') |
3729 | 8 | >>> browser.open('http://launchpad.test/firefox') | 8 | >>> browser.open('http://launchpad.test/firefox') |
3730 | 9 | >>> browser.getLink('Change details').click() | 9 | >>> browser.getLink('Change details').click() |
3732 | 10 | >>> print browser.url | 10 | >>> print(browser.url) |
3733 | 11 | http://launchpad.test/firefox/+edit | 11 | http://launchpad.test/firefox/+edit |
3734 | 12 | 12 | ||
3736 | 13 | >>> print browser.title | 13 | >>> print(browser.title) |
3737 | 14 | Change Mozilla Firefox's details... | 14 | Change Mozilla Firefox's details... |
3738 | 15 | 15 | ||
3739 | 16 | We try to change the project related to that product. First with a | 16 | We try to change the project related to that product. First with a |
3740 | @@ -19,7 +19,7 @@ invalid project. | |||
3741 | 19 | >>> browser.getControl('Part of', index=0).value = 'asdasfasd' | 19 | >>> browser.getControl('Part of', index=0).value = 'asdasfasd' |
3742 | 20 | >>> browser.getControl(name='field.actions.change').click() | 20 | >>> browser.getControl(name='field.actions.change').click() |
3743 | 21 | >>> for message in find_tags_by_class(browser.contents, 'error'): | 21 | >>> for message in find_tags_by_class(browser.contents, 'error'): |
3745 | 22 | ... print message.renderContents() | 22 | ... print(message.renderContents()) |
3746 | 23 | There is 1 error. | 23 | There is 1 error. |
3747 | 24 | <BLANKLINE> | 24 | <BLANKLINE> |
3748 | 25 | ... | 25 | ... |
3749 | @@ -30,12 +30,12 @@ Now we try to edit with a project that exists. | |||
3750 | 30 | 30 | ||
3751 | 31 | >>> browser.getControl('Part of', index=0).value = 'gnome' | 31 | >>> browser.getControl('Part of', index=0).value = 'gnome' |
3752 | 32 | >>> browser.getControl(name='field.actions.change').click() | 32 | >>> browser.getControl(name='field.actions.change').click() |
3754 | 33 | >>> print browser.url | 33 | >>> print(browser.url) |
3755 | 34 | http://launchpad.test/firefox | 34 | http://launchpad.test/firefox |
3756 | 35 | 35 | ||
3757 | 36 | Now we test if we edited it successfully. | 36 | Now we test if we edited it successfully. |
3758 | 37 | 37 | ||
3760 | 38 | >>> print extract_text(find_tag_by_id(browser.contents, 'partof')) | 38 | >>> print(extract_text(find_tag_by_id(browser.contents, 'partof'))) |
3761 | 39 | Part of: GNOME | 39 | Part of: GNOME |
3762 | 40 | 40 | ||
3763 | 41 | 41 | ||
3764 | @@ -50,7 +50,7 @@ But administrators can access the page: | |||
3765 | 50 | >>> admin_browser.url | 50 | >>> admin_browser.url |
3766 | 51 | 'http://launchpad.test/firefox/+admin' | 51 | 'http://launchpad.test/firefox/+admin' |
3767 | 52 | 52 | ||
3769 | 53 | >>> print admin_browser.title | 53 | >>> print(admin_browser.title) |
3770 | 54 | Administer Mozilla Firefox... | 54 | Administer Mozilla Firefox... |
3771 | 55 | 55 | ||
3772 | 56 | And in that page they can set aliases to the product. | 56 | And in that page they can set aliases to the product. |
3773 | @@ -82,7 +82,7 @@ First a user adds a product named newproductname. | |||
3774 | 82 | >>> user_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2'] | 82 | >>> user_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2'] |
3775 | 83 | >>> user_browser.getControl(name='field.license_info').value = 'foo' | 83 | >>> user_browser.getControl(name='field.license_info').value = 'foo' |
3776 | 84 | >>> user_browser.getControl('Complete Registration').click() | 84 | >>> user_browser.getControl('Complete Registration').click() |
3778 | 85 | >>> print user_browser.url | 85 | >>> print(user_browser.url) |
3779 | 86 | http://launchpad.test/newproductname | 86 | http://launchpad.test/newproductname |
3780 | 87 | 87 | ||
3781 | 88 | Then a product named newproductname2. | 88 | Then a product named newproductname2. |
3782 | @@ -98,7 +98,7 @@ Then a product named newproductname2. | |||
3783 | 98 | >>> user_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2'] | 98 | >>> user_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2'] |
3784 | 99 | >>> user_browser.getControl(name='field.license_info').value = 'foo' | 99 | >>> user_browser.getControl(name='field.license_info').value = 'foo' |
3785 | 100 | >>> user_browser.getControl('Complete Registration').click() | 100 | >>> user_browser.getControl('Complete Registration').click() |
3787 | 101 | >>> print user_browser.url | 101 | >>> print(user_browser.url) |
3788 | 102 | http://launchpad.test/newproductname2 | 102 | http://launchpad.test/newproductname2 |
3789 | 103 | 103 | ||
3790 | 104 | Now we try to change newproductname2's name to newproductname. | 104 | Now we try to change newproductname2's name to newproductname. |
3791 | @@ -108,7 +108,7 @@ Now we try to change newproductname2's name to newproductname. | |||
3792 | 108 | >>> admin_browser.getControl('Name').value = 'newproductname' | 108 | >>> admin_browser.getControl('Name').value = 'newproductname' |
3793 | 109 | >>> admin_browser.getControl(name='field.actions.change').click() | 109 | >>> admin_browser.getControl(name='field.actions.change').click() |
3794 | 110 | >>> for message in find_tags_by_class(admin_browser.contents, 'error'): | 110 | >>> for message in find_tags_by_class(admin_browser.contents, 'error'): |
3796 | 111 | ... print message.renderContents() | 111 | ... print(message.renderContents()) |
3797 | 112 | There is 1 error. | 112 | There is 1 error. |
3798 | 113 | <BLANKLINE> | 113 | <BLANKLINE> |
3799 | 114 | ... | 114 | ... |
3800 | @@ -121,7 +121,7 @@ will be accepted because there is no product called newproductname3 | |||
3801 | 121 | 121 | ||
3802 | 122 | >>> admin_browser.getControl('Name').value = 'newproductname3' | 122 | >>> admin_browser.getControl('Name').value = 'newproductname3' |
3803 | 123 | >>> admin_browser.getControl(name='field.actions.change').click() | 123 | >>> admin_browser.getControl(name='field.actions.change').click() |
3805 | 124 | >>> print admin_browser.url | 124 | >>> print(admin_browser.url) |
3806 | 125 | http://launchpad.test/newproductname3 | 125 | http://launchpad.test/newproductname3 |
3807 | 126 | 126 | ||
3808 | 127 | 127 | ||
3809 | @@ -132,7 +132,7 @@ Administrators can change the owner of a project. | |||
3810 | 132 | 132 | ||
3811 | 133 | >>> admin_browser.open( | 133 | >>> admin_browser.open( |
3812 | 134 | ... 'http://launchpad.test/newproductname3') | 134 | ... 'http://launchpad.test/newproductname3') |
3814 | 135 | >>> print extract_text(find_tag_by_id(admin_browser.contents, 'owner')) | 135 | >>> print(extract_text(find_tag_by_id(admin_browser.contents, 'owner'))) |
3815 | 136 | Maintainer: No Privileges Person | 136 | Maintainer: No Privileges Person |
3816 | 137 | ... | 137 | ... |
3817 | 138 | 138 | ||
3818 | @@ -140,7 +140,7 @@ Administrators can change the owner of a project. | |||
3819 | 140 | ... 'http://launchpad.test/newproductname3/+admin') | 140 | ... 'http://launchpad.test/newproductname3/+admin') |
3820 | 141 | >>> admin_browser.getControl('Maintainer').value = 'cprov' | 141 | >>> admin_browser.getControl('Maintainer').value = 'cprov' |
3821 | 142 | >>> admin_browser.getControl(name='field.actions.change').click() | 142 | >>> admin_browser.getControl(name='field.actions.change').click() |
3823 | 143 | >>> print extract_text(find_tag_by_id(admin_browser.contents, 'owner')) | 143 | >>> print(extract_text(find_tag_by_id(admin_browser.contents, 'owner'))) |
3824 | 144 | Maintainer: Celso Providelo | 144 | Maintainer: Celso Providelo |
3825 | 145 | ... | 145 | ... |
3826 | 146 | 146 | ||
3827 | @@ -150,16 +150,16 @@ is created but we allow admins to change it to correct data. | |||
3828 | 150 | 150 | ||
3829 | 151 | >>> admin_browser.open( | 151 | >>> admin_browser.open( |
3830 | 152 | ... 'http://launchpad.test/newproductname3') | 152 | ... 'http://launchpad.test/newproductname3') |
3833 | 153 | >>> print extract_text( | 153 | >>> print(extract_text( |
3834 | 154 | ... find_tag_by_id(admin_browser.contents, 'registration')) | 154 | ... find_tag_by_id(admin_browser.contents, 'registration'))) |
3835 | 155 | Registered ... by No Privileges Person | 155 | Registered ... by No Privileges Person |
3836 | 156 | 156 | ||
3837 | 157 | >>> admin_browser.open( | 157 | >>> admin_browser.open( |
3838 | 158 | ... 'http://launchpad.test/newproductname3/+admin') | 158 | ... 'http://launchpad.test/newproductname3/+admin') |
3839 | 159 | >>> admin_browser.getControl('Registrant').value = 'cprov' | 159 | >>> admin_browser.getControl('Registrant').value = 'cprov' |
3840 | 160 | >>> admin_browser.getControl(name='field.actions.change').click() | 160 | >>> admin_browser.getControl(name='field.actions.change').click() |
3843 | 161 | >>> print extract_text( | 161 | >>> print(extract_text( |
3844 | 162 | ... find_tag_by_id(admin_browser.contents, 'registration')) | 162 | ... find_tag_by_id(admin_browser.contents, 'registration'))) |
3845 | 163 | Registered ... by Celso Providelo | 163 | Registered ... by Celso Providelo |
3846 | 164 | 164 | ||
3847 | 165 | The registrant really should only be a person, not a team, but that | 165 | The registrant really should only be a person, not a team, but that |
3848 | @@ -169,8 +169,8 @@ teams as registrants. | |||
3849 | 169 | >>> admin_browser.open('http://launchpad.test/newproductname3/+admin') | 169 | >>> admin_browser.open('http://launchpad.test/newproductname3/+admin') |
3850 | 170 | >>> admin_browser.getControl('Registrant').value = 'registry' | 170 | >>> admin_browser.getControl('Registrant').value = 'registry' |
3851 | 171 | >>> admin_browser.getControl('Change').click() | 171 | >>> admin_browser.getControl('Change').click() |
3854 | 172 | >>> print extract_text( | 172 | >>> print(extract_text( |
3855 | 173 | ... find_tag_by_id(admin_browser.contents, 'registration')) | 173 | ... find_tag_by_id(admin_browser.contents, 'registration'))) |
3856 | 174 | Registered ... by Registry Administrators | 174 | Registered ... by Registry Administrators |
3857 | 175 | 175 | ||
3858 | 176 | 176 | ||
3859 | @@ -213,9 +213,9 @@ But registry experts can change a product name and set an alias. | |||
3860 | 213 | >>> browser.getControl('Change').click() | 213 | >>> browser.getControl('Change').click() |
3861 | 214 | 214 | ||
3862 | 215 | >>> browser.getLink('Administer').click() | 215 | >>> browser.getLink('Administer').click() |
3864 | 216 | >>> print browser.getControl('Name').value | 216 | >>> print(browser.getControl('Name').value) |
3865 | 217 | trebuchet | 217 | trebuchet |
3867 | 218 | >>> print browser.getControl('Aliases').value | 218 | >>> print(browser.getControl('Aliases').value) |
3868 | 219 | trebucket | 219 | trebucket |
3869 | 220 | 220 | ||
3870 | 221 | 221 | ||
3871 | @@ -241,7 +241,7 @@ The Admins and Registry Experts can deactivate a project. | |||
3872 | 241 | >>> registry_browser.open('http://launchpad.test/bzr/+review-license') | 241 | >>> registry_browser.open('http://launchpad.test/bzr/+review-license') |
3873 | 242 | >>> registry_browser.getControl(name='field.active').value = False | 242 | >>> registry_browser.getControl(name='field.active').value = False |
3874 | 243 | >>> registry_browser.getControl(name='field.actions.change').click() | 243 | >>> registry_browser.getControl(name='field.actions.change').click() |
3876 | 244 | >>> print registry_browser.url | 244 | >>> print(registry_browser.url) |
3877 | 245 | http://launchpad.test/bzr | 245 | http://launchpad.test/bzr |
3878 | 246 | 246 | ||
3879 | 247 | The product overview page should show a notice that a product is | 247 | The product overview page should show a notice that a product is |
3880 | @@ -250,27 +250,27 @@ Admins can still see the product, but regular users can't. | |||
3881 | 250 | 250 | ||
3882 | 251 | >>> registry_browser.open('http://launchpad.test/bzr') | 251 | >>> registry_browser.open('http://launchpad.test/bzr') |
3883 | 252 | >>> contents = find_main_content(registry_browser.contents) | 252 | >>> contents = find_main_content(registry_browser.contents) |
3885 | 253 | >>> print extract_text(contents.find(id='project-inactive')) | 253 | >>> print(extract_text(contents.find(id='project-inactive'))) |
3886 | 254 | This project is currently inactive ... | 254 | This project is currently inactive ... |
3887 | 255 | 255 | ||
3888 | 256 | >>> admin_browser.open('http://launchpad.test/bzr') | 256 | >>> admin_browser.open('http://launchpad.test/bzr') |
3889 | 257 | >>> contents = find_main_content(admin_browser.contents) | 257 | >>> contents = find_main_content(admin_browser.contents) |
3891 | 258 | >>> print extract_text(contents.find(id='project-inactive')) | 258 | >>> print(extract_text(contents.find(id='project-inactive'))) |
3892 | 259 | This project is currently inactive ... | 259 | This project is currently inactive ... |
3893 | 260 | 260 | ||
3894 | 261 | The product can then be reactivated. | 261 | The product can then be reactivated. |
3895 | 262 | 262 | ||
3896 | 263 | >>> registry_browser.getLink('Review project').click() | 263 | >>> registry_browser.getLink('Review project').click() |
3898 | 264 | >>> print registry_browser.url | 264 | >>> print(registry_browser.url) |
3899 | 265 | http://launchpad.test/bzr/+review-license | 265 | http://launchpad.test/bzr/+review-license |
3900 | 266 | 266 | ||
3901 | 267 | >>> registry_browser.getControl(name='field.active').value = True | 267 | >>> registry_browser.getControl(name='field.active').value = True |
3902 | 268 | >>> registry_browser.getControl(name='field.actions.change').click() | 268 | >>> registry_browser.getControl(name='field.actions.change').click() |
3904 | 269 | >>> print registry_browser.url | 269 | >>> print(registry_browser.url) |
3905 | 270 | http://launchpad.test/bzr | 270 | http://launchpad.test/bzr |
3906 | 271 | 271 | ||
3907 | 272 | >>> contents = find_main_content(registry_browser.contents) | 272 | >>> contents = find_main_content(registry_browser.contents) |
3909 | 273 | >>> print contents.find(id='project-inactive') | 273 | >>> print(contents.find(id='project-inactive')) |
3910 | 274 | None | 274 | None |
3911 | 275 | 275 | ||
3912 | 276 | Revert team memberships. | 276 | Revert team memberships. |
3913 | diff --git a/lib/lp/registry/stories/product/xx-product-files.txt b/lib/lp/registry/stories/product/xx-product-files.txt | |||
3914 | index fff1d46..673a34c 100644 | |||
3915 | --- a/lib/lp/registry/stories/product/xx-product-files.txt | |||
3916 | +++ b/lib/lp/registry/stories/product/xx-product-files.txt | |||
3917 | @@ -9,7 +9,7 @@ Any user can see that a project with no releases has no downloads. | |||
3918 | 9 | 9 | ||
3919 | 10 | >>> anon_browser.open('http://launchpad.test/aptoncd') | 10 | >>> anon_browser.open('http://launchpad.test/aptoncd') |
3920 | 11 | >>> content = find_tag_by_id(anon_browser.contents, 'downloads') | 11 | >>> content = find_tag_by_id(anon_browser.contents, 'downloads') |
3922 | 12 | >>> print extract_text(content) | 12 | >>> print(extract_text(content)) |
3923 | 13 | Downloads | 13 | Downloads |
3924 | 14 | APTonCD does not have any download files registered with Launchpad. | 14 | APTonCD does not have any download files registered with Launchpad. |
3925 | 15 | 15 | ||
3926 | @@ -19,7 +19,7 @@ downloadable files. | |||
3927 | 19 | 19 | ||
3928 | 20 | >>> anon_browser.open('http://launchpad.test/thunderbird') | 20 | >>> anon_browser.open('http://launchpad.test/thunderbird') |
3929 | 21 | >>> content = find_tag_by_id(anon_browser.contents, 'downloads') | 21 | >>> content = find_tag_by_id(anon_browser.contents, 'downloads') |
3931 | 22 | >>> print extract_text(content) | 22 | >>> print(extract_text(content)) |
3932 | 23 | Downloads | 23 | Downloads |
3933 | 24 | Mozilla Thunderbird does not have any download files | 24 | Mozilla Thunderbird does not have any download files |
3934 | 25 | registered with Launchpad. | 25 | registered with Launchpad. |
3935 | @@ -30,14 +30,14 @@ release to add download files. | |||
3936 | 30 | 30 | ||
3937 | 31 | >>> anon_browser.open('http://launchpad.test/firefox') | 31 | >>> anon_browser.open('http://launchpad.test/firefox') |
3938 | 32 | >>> content = find_tag_by_id(anon_browser.contents, 'downloads') | 32 | >>> content = find_tag_by_id(anon_browser.contents, 'downloads') |
3940 | 33 | >>> print extract_text(content) | 33 | >>> print(extract_text(content)) |
3941 | 34 | Downloads | 34 | Downloads |
3942 | 35 | Latest version is 0.9.2 | 35 | Latest version is 0.9.2 |
3943 | 36 | firefox_0.9.2.orig.tar.gz... | 36 | firefox_0.9.2.orig.tar.gz... |
3944 | 37 | 37 | ||
3945 | 38 | >>> anon_browser.getLink('All downloads').click() | 38 | >>> anon_browser.getLink('All downloads').click() |
3948 | 39 | >>> print extract_text( | 39 | >>> print(extract_text( |
3949 | 40 | ... find_tag_by_id(anon_browser.contents, 'project-downloads')) | 40 | ... find_tag_by_id(anon_browser.contents, 'project-downloads'))) |
3950 | 41 | 0.9.2 (One (secure) Tree Hill) release from the trunk series | 41 | 0.9.2 (One (secure) Tree Hill) release from the trunk series |
3951 | 42 | released 2004-10-15 | 42 | released 2004-10-15 |
3952 | 43 | Release information | 43 | Release information |
3953 | @@ -56,7 +56,7 @@ otherwise. | |||
3954 | 56 | ... name='prop-prod', information_type=InformationType.PROPRIETARY) | 56 | ... name='prop-prod', information_type=InformationType.PROPRIETARY) |
3955 | 57 | >>> logout() | 57 | >>> logout() |
3956 | 58 | >>> admin_browser.open('http://launchpad.test/prop-prod') | 58 | >>> admin_browser.open('http://launchpad.test/prop-prod') |
3958 | 59 | >>> print find_tag_by_id(admin_browser.contents, 'downloads') | 59 | >>> print(find_tag_by_id(admin_browser.contents, 'downloads')) |
3959 | 60 | None | 60 | None |
3960 | 61 | 61 | ||
3961 | 62 | 62 | ||
3962 | @@ -71,7 +71,7 @@ the delete options. | |||
3963 | 71 | 'http://launchpad.test/firefox/+download' | 71 | 'http://launchpad.test/firefox/+download' |
3964 | 72 | >>> content = find_main_content(anon_browser.contents) | 72 | >>> content = find_main_content(anon_browser.contents) |
3965 | 73 | >>> row = content.find('table').find('tr') | 73 | >>> row = content.find('table').find('tr') |
3967 | 74 | >>> print extract_text(row) | 74 | >>> print(extract_text(row)) |
3968 | 75 | File | 75 | File |
3969 | 76 | Description | 76 | Description |
3970 | 77 | Downloads | 77 | Downloads |
3971 | @@ -85,7 +85,7 @@ Again, for an authenticated user who is not the firefox product owner. | |||
3972 | 85 | 'http://launchpad.test/firefox/+download' | 85 | 'http://launchpad.test/firefox/+download' |
3973 | 86 | >>> content = find_main_content(non_owner.contents) | 86 | >>> content = find_main_content(non_owner.contents) |
3974 | 87 | >>> row = content.find('table').find('tr') | 87 | >>> row = content.find('table').find('tr') |
3976 | 88 | >>> print extract_text(row) | 88 | >>> print(extract_text(row)) |
3977 | 89 | File | 89 | File |
3978 | 90 | Description | 90 | Description |
3979 | 91 | Downloads | 91 | Downloads |
3980 | @@ -99,7 +99,7 @@ Now, login as a firefox admin and see the delete fields. | |||
3981 | 99 | 'http://launchpad.test/firefox/+download' | 99 | 'http://launchpad.test/firefox/+download' |
3982 | 100 | >>> content = find_main_content(firefox_owner.contents) | 100 | >>> content = find_main_content(firefox_owner.contents) |
3983 | 101 | >>> row = content.find('table').find('tr') | 101 | >>> row = content.find('table').find('tr') |
3985 | 102 | >>> print extract_text(row) | 102 | >>> print(extract_text(row)) |
3986 | 103 | File | 103 | File |
3987 | 104 | Description | 104 | Description |
3988 | 105 | Downloads | 105 | Downloads |
3989 | @@ -110,11 +110,11 @@ A project owner should not see the delete button when there are no files. | |||
3990 | 110 | >>> tbird_owner = setupBrowser( | 110 | >>> tbird_owner = setupBrowser( |
3991 | 111 | ... auth='Basic foo.bar@canonical.com:test') | 111 | ... auth='Basic foo.bar@canonical.com:test') |
3992 | 112 | >>> tbird_owner.open('http://launchpad.test/thunderbird/+download') | 112 | >>> tbird_owner.open('http://launchpad.test/thunderbird/+download') |
3994 | 113 | >>> print tbird_owner.title | 113 | >>> print(tbird_owner.title) |
3995 | 114 | Mozilla Thunderbird project files... | 114 | Mozilla Thunderbird project files... |
3996 | 115 | 115 | ||
3997 | 116 | >>> main_content = find_main_content(tbird_owner.contents) | 116 | >>> main_content = find_main_content(tbird_owner.contents) |
3999 | 117 | >>> print extract_text(main_content) | 117 | >>> print(extract_text(main_content)) |
4000 | 118 | Download project files | 118 | Download project files |
4001 | 119 | No download files exist for this project... | 119 | No download files exist for this project... |
4002 | 120 | Add download file to the trunk series for release: 0.8 | 120 | Add download file to the trunk series for release: 0.8 |
4003 | @@ -134,7 +134,7 @@ add download files for each release in that series is presented. | |||
4004 | 134 | 134 | ||
4005 | 135 | >>> firefox_owner.open('http://launchpad.test/firefox/+download') | 135 | >>> firefox_owner.open('http://launchpad.test/firefox/+download') |
4006 | 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'): |
4008 | 137 | ... print extract_text(tag) | 137 | ... print(extract_text(tag)) |
4009 | 138 | Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9 | 138 | Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9 |
4010 | 139 | Add download file to the 1.0 series for release: 1.0.0 | 139 | Add download file to the 1.0 series for release: 1.0.0 |
4011 | 140 | 140 | ||
4012 | @@ -149,7 +149,7 @@ series should not show up in the list. | |||
4013 | 149 | >>> firefox_owner.getControl('Register Series').click() | 149 | >>> firefox_owner.getControl('Register Series').click() |
4014 | 150 | >>> firefox_owner.open('http://launchpad.test/firefox/+download') | 150 | >>> firefox_owner.open('http://launchpad.test/firefox/+download') |
4015 | 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'): |
4017 | 152 | ... print extract_text(tag) | 152 | ... print(extract_text(tag)) |
4018 | 153 | Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9 | 153 | Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9 |
4019 | 154 | Add download file to the 1.0 series for release: 1.0.0 | 154 | Add download file to the 1.0 series for release: 1.0.0 |
4020 | 155 | 155 | ||
4021 | @@ -166,11 +166,11 @@ the list. | |||
4022 | 166 | >>> firefox_owner.getLink('Create release').click() | 166 | >>> firefox_owner.getLink('Create release').click() |
4023 | 167 | >>> firefox_owner.getControl('Date released').value = '2000-01-01' | 167 | >>> firefox_owner.getControl('Date released').value = '2000-01-01' |
4024 | 168 | >>> firefox_owner.getControl('Create release').click() | 168 | >>> firefox_owner.getControl('Create release').click() |
4026 | 169 | >>> print firefox_owner.url | 169 | >>> print(firefox_owner.url) |
4027 | 170 | http://launchpad.test/firefox/+milestone/3.14159 | 170 | http://launchpad.test/firefox/+milestone/3.14159 |
4028 | 171 | >>> firefox_owner.open('http://launchpad.test/firefox/+download') | 171 | >>> firefox_owner.open('http://launchpad.test/firefox/+download') |
4029 | 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'): |
4031 | 173 | ... print extract_text(tag) | 173 | ... print(extract_text(tag)) |
4032 | 174 | Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9 | 174 | Add download file to the trunk series for release: 0.9.2, 0.9.1, 0.9 |
4033 | 175 | Add download file to the 3.0 series for release: 3.14159 | 175 | Add download file to the 3.0 series for release: 3.14159 |
4034 | 176 | Add download file to the 1.0 series for release: 1.0.0 | 176 | Add download file to the 1.0 series for release: 1.0.0 |
4035 | @@ -199,7 +199,7 @@ To add a download file the release version link is used. | |||
4036 | 199 | 199 | ||
4037 | 200 | >>> firefox_owner.open('http://launchpad.test/firefox/+download') | 200 | >>> firefox_owner.open('http://launchpad.test/firefox/+download') |
4038 | 201 | >>> firefox_owner.getLink('1.0.0').click() | 201 | >>> firefox_owner.getLink('1.0.0').click() |
4040 | 202 | >>> print firefox_owner.title | 202 | >>> print(firefox_owner.title) |
4041 | 203 | Add a download file to Mozilla Firefox... | 203 | Add a download file to Mozilla Firefox... |
4042 | 204 | 204 | ||
4043 | 205 | Ensure a non-owner doesn't see the 'Add download file' link after | 205 | Ensure a non-owner doesn't see the 'Add download file' link after |
4044 | @@ -219,7 +219,7 @@ To add a download file the +adddownloadfile page is accessed. | |||
4045 | 219 | The maximum size of the upload file is shown on the page. | 219 | The maximum size of the upload file is shown on the page. |
4046 | 220 | 220 | ||
4047 | 221 | >>> content = find_main_content(firefox_owner.contents) | 221 | >>> content = find_main_content(firefox_owner.contents) |
4049 | 222 | >>> print content | 222 | >>> print(content) |
4050 | 223 | <... | 223 | <... |
4051 | 224 | ...You may upload files up to 1.0 GiB... | 224 | ...You may upload files up to 1.0 GiB... |
4052 | 225 | 225 | ||
4053 | @@ -260,7 +260,7 @@ user to see. | |||
4054 | 260 | >>> anon_browser.open('http://launchpad.test/firefox/+download') | 260 | >>> anon_browser.open('http://launchpad.test/firefox/+download') |
4055 | 261 | >>> content = find_main_content(anon_browser.contents) | 261 | >>> content = find_main_content(anon_browser.contents) |
4056 | 262 | >>> for tr in content.findAll('table')[1].findAll('tr'): | 262 | >>> for tr in content.findAll('table')[1].findAll('tr'): |
4058 | 263 | ... print extract_text(tr) | 263 | ... print(extract_text(tr)) |
4059 | 264 | File Description Downloads | 264 | File Description Downloads |
4060 | 265 | bar.txt (md5) Bar installer - | 265 | bar.txt (md5) Bar installer - |
4061 | 266 | foo.txt (md5, sig) Foo installer - | 266 | foo.txt (md5, sig) Foo installer - |
4062 | @@ -274,7 +274,7 @@ an admin can also delete a release file. | |||
4063 | 274 | >>> checkbox.value = checkbox.options | 274 | >>> checkbox.value = checkbox.options |
4064 | 275 | >>> table = find_tag_by_id(admin_browser.contents, 'downloads') | 275 | >>> table = find_tag_by_id(admin_browser.contents, 'downloads') |
4065 | 276 | >>> for tr in table.findAll('tr'): | 276 | >>> for tr in table.findAll('tr'): |
4067 | 277 | ... print extract_text(tr) | 277 | ... print(extract_text(tr)) |
4068 | 278 | File Description Downloads Delete | 278 | File Description Downloads Delete |
4069 | 279 | bar.txt (md5) Bar installer - | 279 | bar.txt (md5) Bar installer - |
4070 | 280 | foo.txt (md5, sig) Foo installer - | 280 | foo.txt (md5, sig) Foo installer - |
4071 | @@ -285,7 +285,7 @@ an admin can also delete a release file. | |||
4072 | 285 | 1 file has been deleted. | 285 | 1 file has been deleted. |
4073 | 286 | >>> table = find_tag_by_id(admin_browser.contents, 'downloads') | 286 | >>> table = find_tag_by_id(admin_browser.contents, 'downloads') |
4074 | 287 | >>> for tr in table.findAll('tr'): | 287 | >>> for tr in table.findAll('tr'): |
4076 | 288 | ... print extract_text(tr) | 288 | ... print(extract_text(tr)) |
4077 | 289 | File Description Downloads Delete | 289 | File Description Downloads Delete |
4078 | 290 | foo.txt (md5, sig) Foo installer - | 290 | foo.txt (md5, sig) Foo installer - |
4079 | 291 | 291 | ||
4080 | @@ -297,7 +297,7 @@ the md5 digest of the file, and the signature that we uploaded. | |||
4081 | 297 | >>> non_owner.url | 297 | >>> non_owner.url |
4082 | 298 | 'http://launchpad.test/firefox/+download' | 298 | 'http://launchpad.test/firefox/+download' |
4083 | 299 | >>> content = find_main_content(non_owner.contents) | 299 | >>> content = find_main_content(non_owner.contents) |
4085 | 300 | >>> print content | 300 | >>> print(content) |
4086 | 301 | <... | 301 | <... |
4087 | 302 | ...foo.txt...md5...sig...Foo installer... | 302 | ...foo.txt...md5...sig...Foo installer... |
4088 | 303 | 303 | ||
4089 | @@ -388,7 +388,7 @@ are listed within series in reverse chronological order, except | |||
4090 | 388 | >>> for row in rows[1:]: | 388 | >>> for row in rows[1:]: |
4091 | 389 | ... a_list = row.findAll('a') | 389 | ... a_list = row.findAll('a') |
4092 | 390 | ... if len(a_list) > 0: | 390 | ... if len(a_list) > 0: |
4094 | 391 | ... print a_list[0].string | 391 | ... print(a_list[0].string) |
4095 | 392 | firefox_0.9.2.orig.tar.gz | 392 | firefox_0.9.2.orig.tar.gz |
4096 | 393 | foo09.txt | 393 | foo09.txt |
4097 | 394 | foo3.txt | 394 | foo3.txt |
4098 | @@ -423,7 +423,7 @@ XXX Mon May 7 10:02:49 2007 -- bac | |||
4099 | 423 | ... if key.lower() == "location": | 423 | ... if key.lower() == "location": |
4100 | 424 | ... redirect_url = value | 424 | ... redirect_url = value |
4101 | 425 | ... break | 425 | ... break |
4103 | 426 | >>> print urlopen(redirect_url).read() | 426 | >>> print(urlopen(redirect_url).read()) |
4104 | 427 | Foo2 installer package... | 427 | Foo2 installer package... |
4105 | 428 | 428 | ||
4106 | 429 | Delete the file foo2.txt. | 429 | Delete the file foo2.txt. |
4107 | @@ -449,7 +449,7 @@ Ensure the file is no longer listed. | |||
4108 | 449 | >>> for row in rows[1:]: | 449 | >>> for row in rows[1:]: |
4109 | 450 | ... a_list = row.findAll('a') | 450 | ... a_list = row.findAll('a') |
4110 | 451 | ... if len(a_list) > 0: | 451 | ... if len(a_list) > 0: |
4112 | 452 | ... print a_list[0].string | 452 | ... print(a_list[0].string) |
4113 | 453 | firefox_0.9.2.orig.tar.gz | 453 | firefox_0.9.2.orig.tar.gz |
4114 | 454 | foo09.txt | 454 | foo09.txt |
4115 | 455 | foo3.txt | 455 | foo3.txt |
4116 | @@ -465,7 +465,7 @@ Non-administrators do not have the delete option. | |||
4117 | 465 | >>> non_owner.open('http://launchpad.test/firefox/trunk/0.9') | 465 | >>> non_owner.open('http://launchpad.test/firefox/trunk/0.9') |
4118 | 466 | >>> table = find_tag_by_id(non_owner.contents, 'downloads') | 466 | >>> table = find_tag_by_id(non_owner.contents, 'downloads') |
4119 | 467 | >>> for tr in table.findAll('tr'): | 467 | >>> for tr in table.findAll('tr'): |
4121 | 468 | ... print extract_text(tr) | 468 | ... print(extract_text(tr)) |
4122 | 469 | File Description Downloads | 469 | File Description Downloads |
4123 | 470 | foo09.txt (md5) Foo09 installer - | 470 | foo09.txt (md5) Foo09 installer - |
4124 | 471 | 471 | ||
4125 | @@ -484,7 +484,7 @@ so it is not shown. | |||
4126 | 484 | >>> firefox_owner.open('http://launchpad.test/firefox/trunk/0.9') | 484 | >>> firefox_owner.open('http://launchpad.test/firefox/trunk/0.9') |
4127 | 485 | >>> table = find_tag_by_id(firefox_owner.contents, 'downloads') | 485 | >>> table = find_tag_by_id(firefox_owner.contents, 'downloads') |
4128 | 486 | >>> for tr in table.findAll('tr'): | 486 | >>> for tr in table.findAll('tr'): |
4130 | 487 | ... print extract_text(tr) | 487 | ... print(extract_text(tr)) |
4131 | 488 | File Description Downloads Delete | 488 | File Description Downloads Delete |
4132 | 489 | foo09.txt (md5) Foo09 installer - | 489 | foo09.txt (md5) Foo09 installer - |
4133 | 490 | 490 | ||
4134 | diff --git a/lib/lp/registry/stories/product/xx-product-index.txt b/lib/lp/registry/stories/product/xx-product-index.txt | |||
4135 | index 72e1d36..28e7079 100644 | |||
4136 | --- a/lib/lp/registry/stories/product/xx-product-index.txt | |||
4137 | +++ b/lib/lp/registry/stories/product/xx-product-index.txt | |||
4138 | @@ -11,7 +11,7 @@ The product page has a link to help translate it. | |||
4139 | 11 | >>> link = user_browser.getLink( | 11 | >>> link = user_browser.getLink( |
4140 | 12 | ... url='http://translations.launchpad.test/evolution') | 12 | ... url='http://translations.launchpad.test/evolution') |
4141 | 13 | >>> link.click() | 13 | >>> link.click() |
4143 | 14 | >>> print user_browser.title | 14 | >>> print(user_browser.title) |
4144 | 15 | Translations : Evolution | 15 | Translations : Evolution |
4145 | 16 | 16 | ||
4146 | 17 | 17 | ||
4147 | @@ -20,7 +20,7 @@ Links and Programming languages | |||
4148 | 20 | 20 | ||
4149 | 21 | Evolution has no external links. | 21 | Evolution has no external links. |
4150 | 22 | 22 | ||
4152 | 23 | >>> print find_tag_by_id(user_browser.contents, 'external-links-heading') | 23 | >>> print(find_tag_by_id(user_browser.contents, 'external-links-heading')) |
4153 | 24 | None | 24 | None |
4154 | 25 | 25 | ||
4155 | 26 | Now update Tomcat to actually have this data: | 26 | Now update Tomcat to actually have this data: |
4156 | @@ -51,14 +51,14 @@ Let's check it out: | |||
4157 | 51 | >>> content = find_main_content(browser.contents) | 51 | >>> content = find_main_content(browser.contents) |
4158 | 52 | >>> external_links = find_tag_by_id(content, 'external-links') | 52 | >>> external_links = find_tag_by_id(content, 'external-links') |
4159 | 53 | >>> for link in external_links.findAll('a'): | 53 | >>> for link in external_links.findAll('a'): |
4161 | 54 | ... print extract_text(link), link['href'] | 54 | ... print(extract_text(link), link['href']) |
4162 | 55 | Home page http://home.page/ | 55 | Home page http://home.page/ |
4163 | 56 | Sourceforge project http://sourceforge.net/projects/sf-tomcat | 56 | Sourceforge project http://sourceforge.net/projects/sf-tomcat |
4164 | 57 | Wiki http://wiki.url/ | 57 | Wiki http://wiki.url/ |
4165 | 58 | Screenshots http://screenshots.url/ | 58 | Screenshots http://screenshots.url/ |
4166 | 59 | External downloads http://download.url/ | 59 | External downloads http://download.url/ |
4167 | 60 | 60 | ||
4169 | 61 | >>> print extract_text(find_tag_by_id(content, 'product-languages')) | 61 | >>> print(extract_text(find_tag_by_id(content, 'product-languages'))) |
4170 | 62 | Programming languages: C++,Xenon and Purple | 62 | Programming languages: C++,Xenon and Purple |
4171 | 63 | 63 | ||
4172 | 64 | When the sourceforge URL is identical to the homepage, we omit the homepage: | 64 | When the sourceforge URL is identical to the homepage, we omit the homepage: |
4173 | @@ -76,7 +76,7 @@ When the sourceforge URL is identical to the homepage, we omit the homepage: | |||
4174 | 76 | >>> content = find_main_content(browser.contents) | 76 | >>> content = find_main_content(browser.contents) |
4175 | 77 | >>> external_links = find_tag_by_id(content, 'external-links') | 77 | >>> external_links = find_tag_by_id(content, 'external-links') |
4176 | 78 | >>> for link in external_links.findAll('a'): | 78 | >>> for link in external_links.findAll('a'): |
4178 | 79 | ... print extract_text(link), link['href'] | 79 | ... print(extract_text(link), link['href']) |
4179 | 80 | Sourceforge project http://sourceforge.net/projects/sf-tomcat | 80 | Sourceforge project http://sourceforge.net/projects/sf-tomcat |
4180 | 81 | Wiki http://wiki.url/ | 81 | Wiki http://wiki.url/ |
4181 | 82 | Screenshots http://screenshots.url/ | 82 | Screenshots http://screenshots.url/ |
4182 | @@ -101,8 +101,8 @@ been reviewed by a Launchpad administrator will be displayed as | |||
4183 | 101 | Any user can see that the project's licence has not been reviewed. | 101 | Any user can see that the project's licence has not been reviewed. |
4184 | 102 | 102 | ||
4185 | 103 | >>> user_browser.open('http://launchpad.test/thunderbird') | 103 | >>> user_browser.open('http://launchpad.test/thunderbird') |
4188 | 104 | >>> print extract_text( | 104 | >>> print(extract_text( |
4189 | 105 | ... find_tag_by_id(user_browser.contents, 'license-status')) | 105 | ... find_tag_by_id(user_browser.contents, 'license-status'))) |
4190 | 106 | This projectās licence has not been reviewed. | 106 | This projectās licence has not been reviewed. |
4191 | 107 | 107 | ||
4192 | 108 | Changing the state to reviewed but not approved results in the project | 108 | Changing the state to reviewed but not approved results in the project |
4193 | @@ -129,11 +129,11 @@ direct the owner to purchase a subscription. | |||
4194 | 129 | >>> transaction.commit() | 129 | >>> transaction.commit() |
4195 | 130 | >>> logout() | 130 | >>> logout() |
4196 | 131 | >>> owner_browser.open('http://launchpad.test/firefox') | 131 | >>> owner_browser.open('http://launchpad.test/firefox') |
4198 | 132 | >>> print find_tag_by_id(owner_browser.contents, 'license-status') | 132 | >>> print(find_tag_by_id(owner_browser.contents, 'license-status')) |
4199 | 133 | <...This projectās licence is proprietary... | 133 | <...This projectās licence is proprietary... |
4200 | 134 | 134 | ||
4203 | 135 | >>> print find_tag_by_id(owner_browser.contents, | 135 | >>> print(find_tag_by_id(owner_browser.contents, |
4204 | 136 | ... 'portlet-requires-subscription') | 136 | ... 'portlet-requires-subscription')) |
4205 | 137 | <div...Purchasing a commercial subscription is required...</div> | 137 | <div...Purchasing a commercial subscription is required...</div> |
4206 | 138 | 138 | ||
4207 | 139 | Any user can see that the project's licence is proprietary. | 139 | Any user can see that the project's licence is proprietary. |
4208 | @@ -141,8 +141,8 @@ Any user can see that the project's licence is proprietary. | |||
4209 | 141 | >>> user_browser.open('http://launchpad.test/firefox') | 141 | >>> user_browser.open('http://launchpad.test/firefox') |
4210 | 142 | >>> user_browser.contents | 142 | >>> user_browser.contents |
4211 | 143 | '<...This project’s licence is proprietary... | 143 | '<...This project’s licence is proprietary... |
4214 | 144 | >>> print extract_text( | 144 | >>> print(extract_text( |
4215 | 145 | ... find_tag_by_id(user_browser.contents, 'licences')) | 145 | ... find_tag_by_id(user_browser.contents, 'licences'))) |
4216 | 146 | Licence: | 146 | Licence: |
4217 | 147 | Other/Proprietary (Internal project.) | 147 | Other/Proprietary (Internal project.) |
4218 | 148 | Commercial subscription expires ... | 148 | Commercial subscription expires ... |
4219 | @@ -150,8 +150,8 @@ Any user can see that the project's licence is proprietary. | |||
4220 | 150 | 150 | ||
4221 | 151 | A non-owner does not see that a commercial subscription is due. | 151 | A non-owner does not see that a commercial subscription is due. |
4222 | 152 | 152 | ||
4225 | 153 | >>> print find_tag_by_id(user_browser.contents, | 153 | >>> print(find_tag_by_id(user_browser.contents, |
4226 | 154 | ... 'portlet-requires-subscription') | 154 | ... 'portlet-requires-subscription')) |
4227 | 155 | None | 155 | None |
4228 | 156 | 156 | ||
4229 | 157 | If the project qualifies for free hosting, tghe portlet is not displayed. | 157 | If the project qualifies for free hosting, tghe portlet is not displayed. |
4230 | @@ -160,8 +160,8 @@ If the project qualifies for free hosting, tghe portlet is not displayed. | |||
4231 | 160 | >>> flush_database_updates() | 160 | >>> flush_database_updates() |
4232 | 161 | >>> transaction.commit() | 161 | >>> transaction.commit() |
4233 | 162 | >>> owner_browser.open('http://launchpad.test/firefox') | 162 | >>> owner_browser.open('http://launchpad.test/firefox') |
4236 | 163 | >>> print find_tag_by_id(owner_browser.contents, | 163 | >>> print(find_tag_by_id(owner_browser.contents, |
4237 | 164 | ... 'portlet-requires-subscription') | 164 | ... 'portlet-requires-subscription')) |
4238 | 165 | None | 165 | None |
4239 | 166 | 166 | ||
4240 | 167 | If the project's licence is open source, the licence status is not | 167 | If the project's licence is open source, the licence status is not |
4241 | @@ -169,10 +169,10 @@ displayed on the index page, since most projects fall into this | |||
4242 | 169 | category. | 169 | category. |
4243 | 170 | 170 | ||
4244 | 171 | >>> user_browser.open('http://launchpad.test/firefox') | 171 | >>> user_browser.open('http://launchpad.test/firefox') |
4246 | 172 | >>> print find_tag_by_id(owner_browser.contents, 'license-status') | 172 | >>> print(find_tag_by_id(owner_browser.contents, 'license-status')) |
4247 | 173 | None | 173 | None |
4250 | 174 | >>> print extract_text( | 174 | >>> print(extract_text( |
4251 | 175 | ... find_tag_by_id(user_browser.contents, 'licences')) | 175 | ... find_tag_by_id(user_browser.contents, 'licences'))) |
4252 | 176 | Licence: | 176 | Licence: |
4253 | 177 | GNU GPL v2 | 177 | GNU GPL v2 |
4254 | 178 | Commercial subscription expires ... | 178 | Commercial subscription expires ... |
4255 | @@ -200,8 +200,8 @@ Enable the subscription. | |||
4256 | 200 | 200 | ||
4257 | 201 | >>> owner_browser = setupBrowser(auth='Basic bac@canonical.com:test') | 201 | >>> owner_browser = setupBrowser(auth='Basic bac@canonical.com:test') |
4258 | 202 | >>> owner_browser.open('http://launchpad.test/mega-money-maker') | 202 | >>> owner_browser.open('http://launchpad.test/mega-money-maker') |
4261 | 203 | >>> print extract_text(find_tag_by_id(owner_browser.contents, | 203 | >>> print(extract_text(find_tag_by_id(owner_browser.contents, |
4262 | 204 | ... 'commercial_subscription')) | 204 | ... 'commercial_subscription'))) |
4263 | 205 | Commercial subscription expires ... | 205 | Commercial subscription expires ... |
4264 | 206 | 206 | ||
4265 | 207 | Commercial team members will see the expiration information. | 207 | Commercial team members will see the expiration information. |
4266 | @@ -209,15 +209,15 @@ Commercial team members will see the expiration information. | |||
4267 | 209 | >>> comm_browser = setupBrowser( | 209 | >>> comm_browser = setupBrowser( |
4268 | 210 | ... auth='Basic commercial-member@canonical.com:test') | 210 | ... auth='Basic commercial-member@canonical.com:test') |
4269 | 211 | >>> comm_browser.open('http://launchpad.test/mega-money-maker') | 211 | >>> comm_browser.open('http://launchpad.test/mega-money-maker') |
4272 | 212 | >>> print extract_text(find_tag_by_id(comm_browser.contents, | 212 | >>> print(extract_text(find_tag_by_id(comm_browser.contents, |
4273 | 213 | ... 'commercial_subscription')) | 213 | ... 'commercial_subscription'))) |
4274 | 214 | Commercial subscription expires ... | 214 | Commercial subscription expires ... |
4275 | 215 | 215 | ||
4276 | 216 | Launchpad administrators will see the expiration information. | 216 | Launchpad administrators will see the expiration information. |
4277 | 217 | 217 | ||
4278 | 218 | >>> admin_browser.open('http://launchpad.test/mega-money-maker') | 218 | >>> admin_browser.open('http://launchpad.test/mega-money-maker') |
4281 | 219 | >>> print extract_text(find_tag_by_id(admin_browser.contents, | 219 | >>> print(extract_text(find_tag_by_id(admin_browser.contents, |
4282 | 220 | ... 'commercial_subscription')) | 220 | ... 'commercial_subscription'))) |
4283 | 221 | Commercial subscription expires ... | 221 | Commercial subscription expires ... |
4284 | 222 | 222 | ||
4285 | 223 | 223 | ||
4286 | @@ -227,8 +227,8 @@ Development | |||
4287 | 227 | The project page shows the series that is the focus of development. | 227 | The project page shows the series that is the focus of development. |
4288 | 228 | 228 | ||
4289 | 229 | >>> anon_browser.open('http://launchpad.test/firefox') | 229 | >>> anon_browser.open('http://launchpad.test/firefox') |
4292 | 230 | >>> print extract_text( | 230 | >>> print(extract_text( |
4293 | 231 | ... find_tag_by_id(anon_browser.contents, 'development-focus')) | 231 | ... find_tag_by_id(anon_browser.contents, 'development-focus'))) |
4294 | 232 | trunk series is the current focus of development. | 232 | trunk series is the current focus of development. |
4295 | 233 | 233 | ||
4296 | 234 | The page has a link to view the project's milestones. | 234 | The page has a link to view the project's milestones. |
4297 | @@ -252,7 +252,7 @@ home page. | |||
4298 | 252 | 252 | ||
4299 | 253 | >>> Product.byName("firefox").setAliases(['iceweasel', 'snowchicken']) | 253 | >>> Product.byName("firefox").setAliases(['iceweasel', 'snowchicken']) |
4300 | 254 | >>> anon_browser.open('http://launchpad.test/firefox') | 254 | >>> anon_browser.open('http://launchpad.test/firefox') |
4302 | 255 | >>> print extract_text(find_tag_by_id(anon_browser.contents, 'aliases')) | 255 | >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'aliases'))) |
4303 | 256 | Also known as: iceweasel, snowchicken | 256 | Also known as: iceweasel, snowchicken |
4304 | 257 | 257 | ||
4305 | 258 | 258 | ||
4306 | @@ -262,8 +262,8 @@ Ubuntu packaging | |||
4307 | 262 | If a product is packaged in Ubuntu the links are shown. | 262 | If a product is packaged in Ubuntu the links are shown. |
4308 | 263 | 263 | ||
4309 | 264 | >>> user_browser.open('http://launchpad.test/firefox') | 264 | >>> user_browser.open('http://launchpad.test/firefox') |
4312 | 265 | >>> print extract_text( | 265 | >>> print(extract_text( |
4313 | 266 | ... find_tag_by_id(user_browser.contents, 'portlet-packages')) | 266 | ... find_tag_by_id(user_browser.contents, 'portlet-packages'))) |
4314 | 267 | All packages | 267 | All packages |
4315 | 268 | Packages in Distributions | 268 | Packages in Distributions |
4316 | 269 | mozilla-firefox source package in Warty Version 0.9 uploaded on... | 269 | mozilla-firefox source package in Warty Version 0.9 uploaded on... |
4317 | diff --git a/lib/lp/registry/stories/product/xx-product-package-pages.txt b/lib/lp/registry/stories/product/xx-product-package-pages.txt | |||
4318 | index 93e9bbf..54261e5 100644 | |||
4319 | --- a/lib/lp/registry/stories/product/xx-product-package-pages.txt | |||
4320 | +++ b/lib/lp/registry/stories/product/xx-product-package-pages.txt | |||
4321 | @@ -6,16 +6,16 @@ each. | |||
4322 | 6 | 6 | ||
4323 | 7 | >>> anon_browser.open( | 7 | >>> anon_browser.open( |
4324 | 8 | ... 'http://launchpad.test/evolution/+packages') | 8 | ... 'http://launchpad.test/evolution/+packages') |
4326 | 9 | >>> print anon_browser.title | 9 | >>> print(anon_browser.title) |
4327 | 10 | Linked packages ... | 10 | Linked packages ... |
4330 | 11 | >>> print extract_text( | 11 | >>> print(extract_text( |
4331 | 12 | ... find_tag_by_id(anon_browser.contents, 'distribution-series')) | 12 | ... find_tag_by_id(anon_browser.contents, 'distribution-series'))) |
4332 | 13 | Distribution series Source package Version Project series | 13 | Distribution series Source package Version Project series |
4333 | 14 | Warty (4.10) evolution Evolution trunk series ... | 14 | Warty (4.10) evolution Evolution trunk series ... |
4334 | 15 | 15 | ||
4335 | 16 | >>> anon_browser.getLink(url='/ubuntu/warty/+source/evolution').click() | 16 | >>> anon_browser.getLink(url='/ubuntu/warty/+source/evolution').click() |
4338 | 17 | >>> print extract_text( | 17 | >>> print(extract_text( |
4339 | 18 | ... find_tag_by_id(anon_browser.contents, 'maincontent').h1) | 18 | ... find_tag_by_id(anon_browser.contents, 'maincontent').h1)) |
4340 | 19 | evolution source package in Warty | 19 | evolution source package in Warty |
4341 | 20 | 20 | ||
4342 | 21 | It can also show the packages by product series. And if you have permission | 21 | It can also show the packages by product series. And if you have permission |
4343 | @@ -25,10 +25,10 @@ Evolution. | |||
4344 | 25 | 25 | ||
4345 | 26 | >>> evo_owner = setupBrowser(auth='Basic mark@example.com:test') | 26 | >>> evo_owner = setupBrowser(auth='Basic mark@example.com:test') |
4346 | 27 | >>> evo_owner.open('http://launchpad.test/evolution/+packages') | 27 | >>> evo_owner.open('http://launchpad.test/evolution/+packages') |
4348 | 28 | >>> print evo_owner.title | 28 | >>> print(evo_owner.title) |
4349 | 29 | Linked packages ... | 29 | Linked packages ... |
4352 | 30 | >>> print extract_text(find_tag_by_id( | 30 | >>> print(extract_text(find_tag_by_id( |
4353 | 31 | ... evo_owner.contents, 'packages-trunk')) | 31 | ... evo_owner.contents, 'packages-trunk'))) |
4354 | 32 | Distribution Distribution series Source package Version | 32 | Distribution Distribution series Source package Version |
4355 | 33 | Ubuntu Warty (4.10) evolution Remove... | 33 | Ubuntu Warty (4.10) evolution Remove... |
4356 | 34 | Ubuntu Hoary (5.04) evolution 1.0 Remove... | 34 | Ubuntu Hoary (5.04) evolution 1.0 Remove... |
4357 | @@ -39,7 +39,7 @@ Evolution. | |||
4358 | 39 | Any logged in users can still see the links to create a packaging link. | 39 | Any logged in users can still see the links to create a packaging link. |
4359 | 40 | 40 | ||
4360 | 41 | >>> user_browser.open('http://launchpad.test/evolution/+packages') | 41 | >>> user_browser.open('http://launchpad.test/evolution/+packages') |
4362 | 42 | >>> print user_browser.getLink(url='/evolution/trunk/+ubuntupkg').url | 42 | >>> print(user_browser.getLink(url='/evolution/trunk/+ubuntupkg').url) |
4363 | 43 | http://launchpad.test/evolution/trunk/+ubuntupkg | 43 | http://launchpad.test/evolution/trunk/+ubuntupkg |
4364 | 44 | 44 | ||
4365 | 45 | >>> anon_browser.open('http://launchpad.test/evolution/+packages') | 45 | >>> anon_browser.open('http://launchpad.test/evolution/+packages') |
4366 | @@ -56,16 +56,16 @@ Packaging links can be deleted if they were created in error. | |||
4367 | 56 | 56 | ||
4368 | 57 | >>> evo_owner.getLink( | 57 | >>> evo_owner.getLink( |
4369 | 58 | ... url='/ubuntu/warty/+source/evolution/+remove-packaging').click() | 58 | ... url='/ubuntu/warty/+source/evolution/+remove-packaging').click() |
4371 | 59 | >>> print evo_owner.title | 59 | >>> print(evo_owner.title) |
4372 | 60 | Unlink an upstream project... | 60 | Unlink an upstream project... |
4373 | 61 | >>> evo_owner.getControl('Unlink').click() | 61 | >>> evo_owner.getControl('Unlink').click() |
4375 | 62 | >>> print evo_owner.title | 62 | >>> print(evo_owner.title) |
4376 | 63 | Linked packages... | 63 | Linked packages... |
4377 | 64 | 64 | ||
4378 | 65 | >>> print_feedback_messages(evo_owner.contents) | 65 | >>> print_feedback_messages(evo_owner.contents) |
4379 | 66 | Removed upstream association between Evolution trunk series and Warty. | 66 | Removed upstream association between Evolution trunk series and Warty. |
4380 | 67 | 67 | ||
4383 | 68 | >>> print extract_text(find_tag_by_id( | 68 | >>> print(extract_text(find_tag_by_id( |
4384 | 69 | ... evo_owner.contents, 'packages-trunk')) | 69 | ... evo_owner.contents, 'packages-trunk'))) |
4385 | 70 | Distribution Distribution series Source package Version | 70 | Distribution Distribution series Source package Version |
4386 | 71 | Ubuntu Hoary (5.04) evolution 1.0 Remove... | 71 | Ubuntu Hoary (5.04) evolution 1.0 Remove... |
4387 | diff --git a/lib/lp/registry/stories/product/xx-product-rdf.txt b/lib/lp/registry/stories/product/xx-product-rdf.txt | |||
4388 | index 711ceeb..32219d1 100644 | |||
4389 | --- a/lib/lp/registry/stories/product/xx-product-rdf.txt | |||
4390 | +++ b/lib/lp/registry/stories/product/xx-product-rdf.txt | |||
4391 | @@ -3,7 +3,7 @@ We export DOAP RDF metadata for products from a link in the | |||
4392 | 3 | 3 | ||
4393 | 4 | >>> anon_browser.open("http://launchpad.test/firefox") | 4 | >>> anon_browser.open("http://launchpad.test/firefox") |
4394 | 5 | >>> anon_browser.getLink("RDF metadata").click() | 5 | >>> anon_browser.getLink("RDF metadata").click() |
4396 | 6 | >>> print anon_browser.contents | 6 | >>> print(anon_browser.contents) |
4397 | 7 | <?xml version="1.0" encoding="utf-8"...?> | 7 | <?xml version="1.0" encoding="utf-8"...?> |
4398 | 8 | <rdf:RDF ...xmlns:lp="https://launchpad.net/rdf/launchpad#"...> | 8 | <rdf:RDF ...xmlns:lp="https://launchpad.net/rdf/launchpad#"...> |
4399 | 9 | <lp:Product> | 9 | <lp:Product> |
4400 | @@ -26,5 +26,5 @@ And it's valid XML and RDF: | |||
4401 | 26 | 26 | ||
4402 | 27 | >>> from xml.dom.minidom import parseString | 27 | >>> from xml.dom.minidom import parseString |
4403 | 28 | >>> document = parseString(str(anon_browser.contents)) | 28 | >>> document = parseString(str(anon_browser.contents)) |
4405 | 29 | >>> print document.documentElement.nodeName | 29 | >>> print(document.documentElement.nodeName) |
4406 | 30 | rdf:RDF | 30 | rdf:RDF |
4407 | 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 | |||
4408 | index c04c1dd..abb9ff1 100644 | |||
4409 | --- a/lib/lp/registry/stories/product/xx-product-reassignment-and-milestones.txt | |||
4410 | +++ b/lib/lp/registry/stories/product/xx-product-reassignment-and-milestones.txt | |||
4411 | @@ -9,7 +9,7 @@ even if the user was trying to set the milestone value. | |||
4412 | 9 | >>> browser.getControl("Save Changes").click() | 9 | >>> browser.getControl("Save Changes").click() |
4413 | 10 | 10 | ||
4414 | 11 | >>> for message in find_tags_by_class(browser.contents, 'message'): | 11 | >>> for message in find_tags_by_class(browser.contents, 'message'): |
4416 | 12 | ... print message.renderContents() | 12 | ... print(message.renderContents()) |
4417 | 13 | The milestone setting was ignored because you reassigned the bug | 13 | The milestone setting was ignored because you reassigned the bug |
4418 | 14 | to...Evolution... | 14 | to...Evolution... |
4419 | 15 | 15 | ||
4420 | @@ -37,6 +37,6 @@ milestone value, if one was set. | |||
4421 | 37 | >>> browser.getControl("Save Changes").click() | 37 | >>> browser.getControl("Save Changes").click() |
4422 | 38 | 38 | ||
4423 | 39 | >>> for message in find_tags_by_class(browser.contents, 'message'): | 39 | >>> for message in find_tags_by_class(browser.contents, 'message'): |
4425 | 40 | ... print message.renderContents() | 40 | ... print(message.renderContents()) |
4426 | 41 | The Mozilla Firefox 1.0 milestone setting has been removed | 41 | The Mozilla Firefox 1.0 milestone setting has been removed |
4427 | 42 | because you reassigned the bug to Evolution. | 42 | because you reassigned the bug to Evolution. |
4428 | diff --git a/lib/lp/registry/stories/product/xx-productset.txt b/lib/lp/registry/stories/product/xx-productset.txt | |||
4429 | index 8d24a47..c13ab3a 100644 | |||
4430 | --- a/lib/lp/registry/stories/product/xx-productset.txt | |||
4431 | +++ b/lib/lp/registry/stories/product/xx-productset.txt | |||
4432 | @@ -33,7 +33,7 @@ A member of the Launchpad registry experts team may successfully access the | |||
4433 | 33 | >>> registry_browser.getLink("Review projects").click() | 33 | >>> registry_browser.getLink("Review projects").click() |
4434 | 34 | >>> registry_browser.url | 34 | >>> registry_browser.url |
4435 | 35 | 'http://launchpad.test/projects/+review-licenses' | 35 | 'http://launchpad.test/projects/+review-licenses' |
4437 | 36 | >>> print registry_browser.title | 36 | >>> print(registry_browser.title) |
4438 | 37 | Review projects... | 37 | Review projects... |
4439 | 38 | 38 | ||
4440 | 39 | 39 | ||
4441 | @@ -43,13 +43,13 @@ View all projects | |||
4442 | 43 | The unprivileged user can see "+all". | 43 | The unprivileged user can see "+all". |
4443 | 44 | 44 | ||
4444 | 45 | >>> user_browser.open('http://launchpad.test/projects/+all') | 45 | >>> user_browser.open('http://launchpad.test/projects/+all') |
4446 | 46 | >>> print user_browser.title | 46 | >>> print(user_browser.title) |
4447 | 47 | Projects registered in Launchpad... | 47 | Projects registered in Launchpad... |
4448 | 48 | 48 | ||
4449 | 49 | The commercial user can also view "+all". | 49 | The commercial user can also view "+all". |
4450 | 50 | 50 | ||
4451 | 51 | >>> registry_browser.open('http://launchpad.test/projects/+all') | 51 | >>> registry_browser.open('http://launchpad.test/projects/+all') |
4453 | 52 | >>> print registry_browser.title | 52 | >>> print(registry_browser.title) |
4454 | 53 | Projects registered in Launchpad... | 53 | Projects registered in Launchpad... |
4455 | 54 | 54 | ||
4456 | 55 | 55 | ||
4457 | @@ -59,17 +59,17 @@ Create a project | |||
4458 | 59 | The unprivileged user can see "+new". | 59 | The unprivileged user can see "+new". |
4459 | 60 | 60 | ||
4460 | 61 | >>> user_browser.open('http://launchpad.test/projects/+new') | 61 | >>> user_browser.open('http://launchpad.test/projects/+new') |
4462 | 62 | >>> print user_browser.title | 62 | >>> print(user_browser.title) |
4463 | 63 | Register a project in Launchpad... | 63 | Register a project in Launchpad... |
4464 | 64 | 64 | ||
4465 | 65 | The commercial user can also view "+new". | 65 | The commercial user can also view "+new". |
4466 | 66 | 66 | ||
4467 | 67 | >>> registry_browser.open('http://launchpad.test/projects/+new') | 67 | >>> registry_browser.open('http://launchpad.test/projects/+new') |
4469 | 68 | >>> print registry_browser.title | 68 | >>> print(registry_browser.title) |
4470 | 69 | Register a project in Launchpad... | 69 | Register a project in Launchpad... |
4471 | 70 | 70 | ||
4472 | 71 | The commercial user can also view "+new". | 71 | The commercial user can also view "+new". |
4473 | 72 | 72 | ||
4474 | 73 | >>> registry_browser.open('http://launchpad.test/projects/+new') | 73 | >>> registry_browser.open('http://launchpad.test/projects/+new') |
4476 | 74 | >>> print registry_browser.title | 74 | >>> print(registry_browser.title) |
4477 | 75 | Register a project in Launchpad... | 75 | Register a project in Launchpad... |
4478 | diff --git a/lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt b/lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt | |||
4479 | index 082bdb6..e33c07c 100644 | |||
4480 | --- a/lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt | |||
4481 | +++ b/lib/lp/registry/stories/productrelease/xx-productrelease-basics.txt | |||
4482 | @@ -22,22 +22,22 @@ release in the series. | |||
4483 | 22 | >>> browser = setupBrowser(auth='Basic test@canonical.com:test') | 22 | >>> browser = setupBrowser(auth='Basic test@canonical.com:test') |
4484 | 23 | >>> browser.open('http://launchpad.test/firefox/+milestone/1.0') | 23 | >>> browser.open('http://launchpad.test/firefox/+milestone/1.0') |
4485 | 24 | >>> browser.getLink('Create release').click() | 24 | >>> browser.getLink('Create release').click() |
4487 | 25 | >>> print browser.url | 25 | >>> print(browser.url) |
4488 | 26 | http://launchpad.test/firefox/+milestone/1.0/+addrelease | 26 | http://launchpad.test/firefox/+milestone/1.0/+addrelease |
4489 | 27 | 27 | ||
4491 | 28 | >>> print browser.title | 28 | >>> print(browser.title) |
4492 | 29 | Create a new release for Mozilla Firefox... | 29 | Create a new release for Mozilla Firefox... |
4493 | 30 | 30 | ||
4494 | 31 | Links to previous releases from the series are listed. | 31 | Links to previous releases from the series are listed. |
4495 | 32 | 32 | ||
4496 | 33 | >>> other_releases = find_tag_by_id(browser.contents, 'other-releases') | 33 | >>> other_releases = find_tag_by_id(browser.contents, 'other-releases') |
4498 | 34 | >>> print extract_text(other_releases) | 34 | >>> print(extract_text(other_releases)) |
4499 | 35 | The following releases have been made for the trunk series: | 35 | The following releases have been made for the trunk series: |
4500 | 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) |
4501 | 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)) |
4502 | 38 | 2004-10-16 Mozilla Firefox 0.9 (One Tree Hill) | 38 | 2004-10-16 Mozilla Firefox 0.9 (One Tree Hill) |
4503 | 39 | 39 | ||
4505 | 40 | >>> print browser.getLink('0.9.1').url | 40 | >>> print(browser.getLink('0.9.1').url) |
4506 | 41 | http://launchpad.test/firefox/trunk/0.9.1 | 41 | http://launchpad.test/firefox/trunk/0.9.1 |
4507 | 42 | 42 | ||
4508 | 43 | Sample Person completes the release. | 43 | Sample Person completes the release. |
4509 | @@ -54,9 +54,9 @@ After creating the release, Sample Person sees the release page. | |||
4510 | 54 | 54 | ||
4511 | 55 | The release's information is displayed in the page. | 55 | The release's information is displayed in the page. |
4512 | 56 | 56 | ||
4514 | 57 | >>> print extract_text(find_tag_by_id(browser.contents, 'release-notes')) | 57 | >>> print(extract_text(find_tag_by_id(browser.contents, 'release-notes'))) |
4515 | 58 | Released 1.0 | 58 | Released 1.0 |
4517 | 59 | >>> print extract_text(find_tag_by_id(browser.contents, 'changelog')) | 59 | >>> print(extract_text(find_tag_by_id(browser.contents, 'changelog'))) |
4518 | 60 | Fix Foo | 60 | Fix Foo |
4519 | 61 | 61 | ||
4520 | 62 | Only one release can be created for each milestone. | 62 | Only one release can be created for each milestone. |
4521 | @@ -106,12 +106,12 @@ The release owner can edit the release via its +edit form: | |||
4522 | 106 | 106 | ||
4523 | 107 | >>> browser.open('http://launchpad.test/firefox/trunk/1.0') | 107 | >>> browser.open('http://launchpad.test/firefox/trunk/1.0') |
4524 | 108 | >>> browser.getLink('Change release details', index=1).click() | 108 | >>> browser.getLink('Change release details', index=1).click() |
4526 | 109 | >>> print browser.title | 109 | >>> print(browser.title) |
4527 | 110 | Edit Mozilla Firefox 1.0 release details... | 110 | Edit Mozilla Firefox 1.0 release details... |
4528 | 111 | 111 | ||
4529 | 112 | >>> browser.getControl('Changelog').value = 'This is not a joke.' | 112 | >>> browser.getControl('Changelog').value = 'This is not a joke.' |
4530 | 113 | >>> browser.getControl('Change').click() | 113 | >>> browser.getControl('Change').click() |
4532 | 114 | >>> print browser.title | 114 | >>> print(browser.title) |
4533 | 115 | 1.0 : Series trunk : Mozilla Firefox | 115 | 1.0 : Series trunk : Mozilla Firefox |
4534 | 116 | 116 | ||
4535 | 117 | 117 | ||
4536 | @@ -123,7 +123,7 @@ release too. | |||
4537 | 123 | >>> from lp.registry.model.person import Person | 123 | >>> from lp.registry.model.person import Person |
4538 | 124 | >>> from lp.registry.model.product import Product | 124 | >>> from lp.registry.model.product import Product |
4539 | 125 | >>> tomcat = Product.selectOneBy(name='tomcat') | 125 | >>> tomcat = Product.selectOneBy(name='tomcat') |
4541 | 126 | >>> print tomcat.owner.name | 126 | >>> print(tomcat.owner.name) |
4542 | 127 | ubuntu-team | 127 | ubuntu-team |
4543 | 128 | 128 | ||
4544 | 129 | Let's add a release as Jeff: | 129 | Let's add a release as Jeff: |
4545 | @@ -137,7 +137,7 @@ Let's add a release as Jeff: | |||
4546 | 137 | >>> browser.getControl('Date released').value = '2008-12-01' | 137 | >>> browser.getControl('Date released').value = '2008-12-01' |
4547 | 138 | >>> browser.getControl('Changelog').value = 'Fix Foo' | 138 | >>> browser.getControl('Changelog').value = 'Fix Foo' |
4548 | 139 | >>> browser.getControl('Create release').click() | 139 | >>> browser.getControl('Create release').click() |
4550 | 140 | >>> print browser.url | 140 | >>> print(browser.url) |
4551 | 141 | http://launchpad.test/tomcat/+milestone/0.6.6.6 | 141 | http://launchpad.test/tomcat/+milestone/0.6.6.6 |
4552 | 142 | 142 | ||
4553 | 143 | Celso is a member of ubuntu-team, so he can edit this release too: | 143 | Celso is a member of ubuntu-team, so he can edit this release too: |
4554 | @@ -145,12 +145,12 @@ Celso is a member of ubuntu-team, so he can edit this release too: | |||
4555 | 145 | >>> browser = setupBrowser(auth='Basic celso.providelo@canonical.com:test') | 145 | >>> browser = setupBrowser(auth='Basic celso.providelo@canonical.com:test') |
4556 | 146 | >>> browser.open('http://launchpad.test/tomcat/trunk/0.6.6.6') | 146 | >>> browser.open('http://launchpad.test/tomcat/trunk/0.6.6.6') |
4557 | 147 | >>> browser.getLink('Change release details', index=0).click() | 147 | >>> browser.getLink('Change release details', index=0).click() |
4559 | 148 | >>> print browser.title | 148 | >>> print(browser.title) |
4560 | 149 | Edit Tomcat 0.6.6.6 release details... | 149 | Edit Tomcat 0.6.6.6 release details... |
4561 | 150 | 150 | ||
4562 | 151 | >>> browser.getControl('Changelog').value = 'Fixes 3 bugs.' | 151 | >>> browser.getControl('Changelog').value = 'Fixes 3 bugs.' |
4563 | 152 | >>> browser.getControl('Change').click() | 152 | >>> browser.getControl('Change').click() |
4565 | 153 | >>> print browser.title | 153 | >>> print(browser.title) |
4566 | 154 | 0.6.6.6 : Series trunk : Tomcat | 154 | 0.6.6.6 : Series trunk : Tomcat |
4567 | 155 | 155 | ||
4568 | 156 | And if no-priv drives the series... | 156 | And if no-priv drives the series... |
4569 | @@ -164,10 +164,10 @@ others: | |||
4570 | 164 | >>> browser = setupBrowser(auth='Basic no-priv@canonical.com:test') | 164 | >>> browser = setupBrowser(auth='Basic no-priv@canonical.com:test') |
4571 | 165 | >>> browser.open('http://launchpad.test/tomcat/trunk/0.6.6.6') | 165 | >>> browser.open('http://launchpad.test/tomcat/trunk/0.6.6.6') |
4572 | 166 | >>> browser.getLink('Change release details', index=0).click() | 166 | >>> browser.getLink('Change release details', index=0).click() |
4574 | 167 | >>> print browser.title | 167 | >>> print(browser.title) |
4575 | 168 | Edit Tomcat 0.6.6.6 release details... | 168 | Edit Tomcat 0.6.6.6 release details... |
4576 | 169 | 169 | ||
4577 | 170 | >>> browser.getControl('Changelog').value = 'Fixes 4 bugs.' | 170 | >>> browser.getControl('Changelog').value = 'Fixes 4 bugs.' |
4578 | 171 | >>> browser.getControl('Change').click() | 171 | >>> browser.getControl('Change').click() |
4580 | 172 | >>> print browser.title | 172 | >>> print(browser.title) |
4581 | 173 | 0.6.6.6 : Series trunk : Tomcat | 173 | 0.6.6.6 : Series trunk : Tomcat |
4582 | diff --git a/lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt b/lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt | |||
4583 | index 08aa581..31563f9 100644 | |||
4584 | --- a/lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt | |||
4585 | +++ b/lib/lp/registry/stories/productrelease/xx-productrelease-delete.txt | |||
4586 | @@ -4,11 +4,11 @@ The main page of a product series includes a list of releases of that series. | |||
4587 | 4 | The 0.9.2 milestone has a release. | 4 | The 0.9.2 milestone has a release. |
4588 | 5 | 5 | ||
4589 | 6 | >>> user_browser.open('http://launchpad.test/firefox/trunk') | 6 | >>> user_browser.open('http://launchpad.test/firefox/trunk') |
4591 | 7 | >>> print user_browser.title | 7 | >>> print(user_browser.title) |
4592 | 8 | Series trunk : Mozilla Firefox | 8 | Series trunk : Mozilla Firefox |
4593 | 9 | 9 | ||
4596 | 10 | >>> print extract_text(find_tag_by_id( | 10 | >>> print(extract_text(find_tag_by_id( |
4597 | 11 | ... user_browser.contents, 'series-trunk')) | 11 | ... user_browser.contents, 'series-trunk'))) |
4598 | 12 | Version Expected Released Summary | 12 | Version Expected Released Summary |
4599 | 13 | Mozilla Firefox 0.9.2 ... None 2004-10-15 ... | 13 | Mozilla Firefox 0.9.2 ... None 2004-10-15 ... |
4600 | 14 | 14 | ||
4601 | @@ -17,7 +17,7 @@ access the delete page. A user without the necessary rights won't see the | |||
4602 | 17 | link and cannot access the +delete page. | 17 | link and cannot access the +delete page. |
4603 | 18 | 18 | ||
4604 | 19 | >>> user_browser.getLink('0.9.2').click() | 19 | >>> user_browser.getLink('0.9.2').click() |
4606 | 20 | >>> print user_browser.title | 20 | >>> print(user_browser.title) |
4607 | 21 | 0.9.2 "One (secure) Tree Hill" : Mozilla Firefox | 21 | 0.9.2 "One (secure) Tree Hill" : Mozilla Firefox |
4608 | 22 | 22 | ||
4609 | 23 | >>> user_browser.getLink(url='/firefox/trunk/0.9.2/+delete') | 23 | >>> user_browser.getLink(url='/firefox/trunk/0.9.2/+delete') |
4610 | @@ -34,14 +34,14 @@ Salgado has the necessary rights, so he sees the link and the +delete page. | |||
4611 | 34 | >>> salgados_browser = setupBrowser(auth='Basic salgado@ubuntu.com:test') | 34 | >>> salgados_browser = setupBrowser(auth='Basic salgado@ubuntu.com:test') |
4612 | 35 | >>> salgados_browser.open('http://launchpad.test/firefox/trunk/0.9.2') | 35 | >>> salgados_browser.open('http://launchpad.test/firefox/trunk/0.9.2') |
4613 | 36 | >>> salgados_browser.getLink('Delete release').click() | 36 | >>> salgados_browser.getLink('Delete release').click() |
4615 | 37 | >>> print salgados_browser.title | 37 | >>> print(salgados_browser.title) |
4616 | 38 | Delete Mozilla Firefox 0.9.2... | 38 | Delete Mozilla Firefox 0.9.2... |
4617 | 39 | 39 | ||
4618 | 40 | The 0.9.2 release has some files associated with it. Salgado reads that | 40 | The 0.9.2 release has some files associated with it. Salgado reads that |
4619 | 41 | they will be deleted too. | 41 | they will be deleted too. |
4620 | 42 | 42 | ||
4621 | 43 | >>> text = extract_text(find_main_content(salgados_browser.contents)) | 43 | >>> text = extract_text(find_main_content(salgados_browser.contents)) |
4623 | 44 | >>> print text.encode('ASCII', 'backslashreplace') | 44 | >>> print(text.encode('ASCII', 'backslashreplace')) |
4624 | 45 | Delete Mozilla Firefox 0.9.2 \u201cOne (secure) Tree Hill\u201d | 45 | Delete Mozilla Firefox 0.9.2 \u201cOne (secure) Tree Hill\u201d |
4625 | 46 | ... | 46 | ... |
4626 | 47 | Are you sure you want to delete the 0.9.2 release of | 47 | Are you sure you want to delete the 0.9.2 release of |
4627 | @@ -52,7 +52,7 @@ they will be deleted too. | |||
4628 | 52 | Salgado chooses the delete button, then reads that the action is successful. | 52 | Salgado chooses the delete button, then reads that the action is successful. |
4629 | 53 | 53 | ||
4630 | 54 | >>> salgados_browser.getControl('Delete Release').click() | 54 | >>> salgados_browser.getControl('Delete Release').click() |
4632 | 55 | >>> print salgados_browser.title | 55 | >>> print(salgados_browser.title) |
4633 | 56 | Series trunk : Mozilla Firefox | 56 | Series trunk : Mozilla Firefox |
4634 | 57 | 57 | ||
4635 | 58 | >>> print_feedback_messages(salgados_browser.contents) | 58 | >>> print_feedback_messages(salgados_browser.contents) |
4636 | @@ -61,7 +61,7 @@ Salgado chooses the delete button, then reads that the action is successful. | |||
4637 | 61 | Milestone 0.9.2 no longer has a release. The release column explains that | 61 | Milestone 0.9.2 no longer has a release. The release column explains that |
4638 | 62 | the milestone is inactive. | 62 | the milestone is inactive. |
4639 | 63 | 63 | ||
4642 | 64 | >>> print extract_text( | 64 | >>> print(extract_text( |
4643 | 65 | ... find_tag_by_id(salgados_browser.contents, 'series-trunk')) | 65 | ... find_tag_by_id(salgados_browser.contents, 'series-trunk'))) |
4644 | 66 | Version Expected Released Summary | 66 | Version Expected Released Summary |
4645 | 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 ... |
4646 | diff --git a/lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt b/lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt | |||
4647 | index 5eb96c5..a620ac3 100644 | |||
4648 | --- a/lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt | |||
4649 | +++ b/lib/lp/registry/stories/productrelease/xx-productrelease-rdf.txt | |||
4650 | @@ -1,8 +1,8 @@ | |||
4651 | 1 | Check that the productrelease RDF export works. | 1 | Check that the productrelease RDF export works. |
4652 | 2 | 2 | ||
4654 | 3 | >>> print http(r""" | 3 | >>> print(http(r""" |
4655 | 4 | ... GET /firefox/trunk/0.9/+rdf HTTP/1.1 | 4 | ... GET /firefox/trunk/0.9/+rdf HTTP/1.1 |
4657 | 5 | ... """) | 5 | ... """)) |
4658 | 6 | HTTP/1.1 200 Ok | 6 | HTTP/1.1 200 Ok |
4659 | 7 | Content-Disposition: attachment; filename="firefox-trunk-0.9.rdf" | 7 | Content-Disposition: attachment; filename="firefox-trunk-0.9.rdf" |
4660 | 8 | Content-Length: ... | 8 | Content-Length: ... |
4661 | diff --git a/lib/lp/registry/stories/productrelease/xx-productrelease-view.txt b/lib/lp/registry/stories/productrelease/xx-productrelease-view.txt | |||
4662 | index 8c41ffd..05f00e4 100644 | |||
4663 | --- a/lib/lp/registry/stories/productrelease/xx-productrelease-view.txt | |||
4664 | +++ b/lib/lp/registry/stories/productrelease/xx-productrelease-view.txt | |||
4665 | @@ -1,11 +1,11 @@ | |||
4666 | 1 | Any user can see a release for a series. | 1 | Any user can see a release for a series. |
4667 | 2 | 2 | ||
4668 | 3 | >>> anon_browser.open('http://launchpad.test/firefox/trunk/0.9.2') | 3 | >>> anon_browser.open('http://launchpad.test/firefox/trunk/0.9.2') |
4670 | 4 | >>> print anon_browser.title | 4 | >>> print(anon_browser.title) |
4671 | 5 | 0.9.2 "One (secure) Tree Hill" : Series trunk : Mozilla Firefox | 5 | 0.9.2 "One (secure) Tree Hill" : Series trunk : Mozilla Firefox |
4672 | 6 | 6 | ||
4673 | 7 | >>> content = find_main_content(anon_browser.contents) | 7 | >>> content = find_main_content(anon_browser.contents) |
4675 | 8 | >>> print extract_text(find_tag_by_id(content, 'Release-details')) | 8 | >>> print(extract_text(find_tag_by_id(content, 'Release-details'))) |
4676 | 9 | Milestone information | 9 | Milestone information |
4677 | 10 | Project: Mozilla Firefox | 10 | Project: Mozilla Firefox |
4678 | 11 | Series: trunk | 11 | Series: trunk |
4679 | @@ -21,11 +21,11 @@ Any user can see a table describing the files that are associated with the | |||
4680 | 21 | release. Each file is linked. | 21 | release. Each file is linked. |
4681 | 22 | 22 | ||
4682 | 23 | >>> table = find_tag_by_id(content, 'downloads') | 23 | >>> table = find_tag_by_id(content, 'downloads') |
4684 | 24 | >>> print extract_text(table) | 24 | >>> print(extract_text(table)) |
4685 | 25 | File Description Downloads | 25 | File Description Downloads |
4686 | 26 | firefox_0.9.2.orig.tar.gz (md5) - | 26 | firefox_0.9.2.orig.tar.gz (md5) - |
4687 | 27 | 27 | ||
4689 | 28 | >>> print table.a | 28 | >>> print(table.a) |
4690 | 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" |
4691 | 30 | title="firefox_0.9.2.orig.tar.gz (9.5 MiB)">... | 30 | title="firefox_0.9.2.orig.tar.gz (9.5 MiB)">... |
4692 | 31 | 31 | ||
4693 | @@ -46,7 +46,7 @@ downloaded and the date of the last download on that table as well. | |||
4694 | 46 | >>> lfa.updateDownloadCount(date(2006, 5, 4), None, 1) | 46 | >>> lfa.updateDownloadCount(date(2006, 5, 4), None, 1) |
4695 | 47 | 47 | ||
4696 | 48 | >>> anon_browser.reload() | 48 | >>> anon_browser.reload() |
4698 | 49 | >>> print extract_text(find_tag_by_id(anon_browser.contents, 'downloads')) | 49 | >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'downloads'))) |
4699 | 50 | File Description Downloads | 50 | File Description Downloads |
4700 | 51 | firefox_0.9.2.orig.tar.gz (md5) 1 last downloaded ... | 51 | firefox_0.9.2.orig.tar.gz (md5) 1 last downloaded ... |
4701 | 52 | Total downloads: 1 | 52 | Total downloads: 1 |
4702 | @@ -58,7 +58,7 @@ downloaded, so we can't say it was downloaded a few minutes/hours ago. | |||
4703 | 58 | >>> import pytz | 58 | >>> import pytz |
4704 | 59 | >>> lfa.updateDownloadCount(datetime.now(pytz.utc).date(), None, 4356) | 59 | >>> lfa.updateDownloadCount(datetime.now(pytz.utc).date(), None, 4356) |
4705 | 60 | >>> anon_browser.reload() | 60 | >>> anon_browser.reload() |
4707 | 61 | >>> print extract_text(find_tag_by_id(anon_browser.contents, 'downloads')) | 61 | >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'downloads'))) |
4708 | 62 | File Description Downloads | 62 | File Description Downloads |
4709 | 63 | firefox_0.9.2.orig.tar.gz (md5) 4,357 last downloaded today | 63 | firefox_0.9.2.orig.tar.gz (md5) 4,357 last downloaded today |
4710 | 64 | Total downloads: 4,357 | 64 | Total downloads: 4,357 |
4711 | 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 | |||
4712 | index c5c938f..64c43bc 100644 | |||
4713 | --- a/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt | |||
4714 | +++ b/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt | |||
4715 | @@ -23,10 +23,10 @@ But Sample Person will and be able to add a series. | |||
4716 | 23 | >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test') | 23 | >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test') |
4717 | 24 | >>> browser.open('http://launchpad.test/firefox') | 24 | >>> browser.open('http://launchpad.test/firefox') |
4718 | 25 | >>> browser.getLink('Register a series').click() | 25 | >>> browser.getLink('Register a series').click() |
4720 | 26 | >>> print browser.url | 26 | >>> print(browser.url) |
4721 | 27 | http://launchpad.test/firefox/+addseries | 27 | http://launchpad.test/firefox/+addseries |
4722 | 28 | 28 | ||
4724 | 29 | >>> print find_main_content(browser.contents).find('h1').renderContents() | 29 | >>> print(find_main_content(browser.contents).find('h1').renderContents()) |
4725 | 30 | Register a new Mozilla Firefox release series | 30 | Register a new Mozilla Firefox release series |
4726 | 31 | 31 | ||
4727 | 32 | After checking that the page +addseries is there, we try to add a new series. | 32 | After checking that the page +addseries is there, we try to add a new series. |
4728 | @@ -43,7 +43,7 @@ Now we are redirected to the Overview page of the product series we just added | |||
4729 | 43 | >>> browser.url | 43 | >>> browser.url |
4730 | 44 | 'http://launchpad.test/firefox/stable' | 44 | 'http://launchpad.test/firefox/stable' |
4731 | 45 | 45 | ||
4733 | 46 | >>> print extract_text(find_tag_by_id(browser.contents, 'description')) | 46 | >>> print(extract_text(find_tag_by_id(browser.contents, 'description'))) |
4734 | 47 | Product series add testing | 47 | Product series add testing |
4735 | 48 | 48 | ||
4736 | 49 | >>> browser.getLink('lp://dev/~mark/firefox/release-0.9.2') | 49 | >>> browser.getLink('lp://dev/~mark/firefox/release-0.9.2') |
4737 | @@ -76,7 +76,7 @@ name already in use and an invalud release URL pattern: | |||
4738 | 76 | We'll get a nice error message for the three problems: | 76 | We'll get a nice error message for the three problems: |
4739 | 77 | 77 | ||
4740 | 78 | >>> for tag in find_tags_by_class(browser.contents, 'message'): | 78 | >>> for tag in find_tags_by_class(browser.contents, 'message'): |
4742 | 79 | ... print extract_text(tag) | 79 | ... print(extract_text(tag)) |
4743 | 80 | There are 2 errors. | 80 | There are 2 errors. |
4744 | 81 | 1.0 is already in use by another series. | 81 | 1.0 is already in use by another series. |
4745 | 82 | Invalid release URL pattern. | 82 | Invalid release URL pattern. |
4746 | @@ -97,7 +97,7 @@ of firefox: | |||
4747 | 97 | The new values are then shown in the series' page. | 97 | The new values are then shown in the series' page. |
4748 | 98 | 98 | ||
4749 | 99 | >>> content = find_tag_by_id(browser.contents, 'series-details') | 99 | >>> content = find_tag_by_id(browser.contents, 'series-details') |
4751 | 100 | >>> print extract_text(find_tag_by_id(content, 'series-name')) | 100 | >>> print(extract_text(find_tag_by_id(content, 'series-name'))) |
4752 | 101 | Series: unstable | 101 | Series: unstable |
4753 | 102 | 102 | ||
4754 | 103 | And if we try to add another series with the same name to same product, we | 103 | And if we try to add another series with the same name to same product, we |
4755 | @@ -110,7 +110,7 @@ should get a nice error message. | |||
4756 | 110 | >>> browser.getControl('Register Series').click() | 110 | >>> browser.getControl('Register Series').click() |
4757 | 111 | 111 | ||
4758 | 112 | >>> for message in find_tags_by_class(browser.contents, 'message'): | 112 | >>> for message in find_tags_by_class(browser.contents, 'message'): |
4760 | 113 | ... print message.renderContents() | 113 | ... print(message.renderContents()) |
4761 | 114 | There is 1 error. | 114 | There is 1 error. |
4762 | 115 | unstable is already in use by another series. | 115 | unstable is already in use by another series. |
4763 | 116 | 116 | ||
4764 | @@ -123,7 +123,7 @@ we can create structural bug subscriptions. | |||
4765 | 123 | 123 | ||
4766 | 124 | >>> browser.open('http://launchpad.test/firefox/unstable') | 124 | >>> browser.open('http://launchpad.test/firefox/unstable') |
4767 | 125 | >>> browser.getLink('Subscribe to bug mail').click() | 125 | >>> browser.getLink('Subscribe to bug mail').click() |
4769 | 126 | >>> print browser.url | 126 | >>> print(browser.url) |
4770 | 127 | http://launchpad.test/firefox/unstable/+subscribe | 127 | http://launchpad.test/firefox/unstable/+subscribe |
4772 | 128 | >>> print browser.title | 128 | >>> print(browser.title) |
4773 | 129 | Subscribe : Series unstable : Bugs : Mozilla Firefox | 129 | Subscribe : Series unstable : Bugs : Mozilla Firefox |
4774 | diff --git a/lib/lp/registry/stories/productseries/xx-productseries-delete.txt b/lib/lp/registry/stories/productseries/xx-productseries-delete.txt | |||
4775 | index b551c96..b1c867d 100644 | |||
4776 | --- a/lib/lp/registry/stories/productseries/xx-productseries-delete.txt | |||
4777 | +++ b/lib/lp/registry/stories/productseries/xx-productseries-delete.txt | |||
4778 | @@ -8,19 +8,19 @@ is really happening in the 1.0 series. | |||
4779 | 8 | 8 | ||
4780 | 9 | >>> owner_browser = setupBrowser(auth='Basic test@canonical.com:test') | 9 | >>> owner_browser = setupBrowser(auth='Basic test@canonical.com:test') |
4781 | 10 | >>> owner_browser.open('http://launchpad.test/firefox/trunk') | 10 | >>> owner_browser.open('http://launchpad.test/firefox/trunk') |
4783 | 11 | >>> print owner_browser.title | 11 | >>> print(owner_browser.title) |
4784 | 12 | Series trunk : Mozilla Firefox | 12 | Series trunk : Mozilla Firefox |
4785 | 13 | 13 | ||
4786 | 14 | >>> owner_browser.getLink('Delete series').click() | 14 | >>> owner_browser.getLink('Delete series').click() |
4788 | 15 | >>> print owner_browser.title | 15 | >>> print(owner_browser.title) |
4789 | 16 | Delete Mozilla Firefox trunk series... | 16 | Delete Mozilla Firefox trunk series... |
4790 | 17 | 17 | ||
4791 | 18 | The trunk series is the focus of development. It cannot be deleted. | 18 | The trunk series is the focus of development. It cannot be deleted. |
4792 | 19 | The owner learns that they must make another series the focus of development | 19 | The owner learns that they must make another series the focus of development |
4793 | 20 | first. There is no delete button on the page. | 20 | first. There is no delete button on the page. |
4794 | 21 | 21 | ||
4797 | 22 | >>> print extract_text( | 22 | >>> print(extract_text( |
4798 | 23 | ... find_tag_by_id(owner_browser.contents, 'cannot-delete')) | 23 | ... find_tag_by_id(owner_browser.contents, 'cannot-delete'))) |
4799 | 24 | You cannot delete a series that is the focus of development. Make | 24 | You cannot delete a series that is the focus of development. Make |
4800 | 25 | another series the focus of development before deleting this one. | 25 | another series the focus of development before deleting this one. |
4801 | 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. |
4802 | @@ -37,12 +37,12 @@ bogus. | |||
4803 | 37 | 37 | ||
4804 | 38 | >>> owner_browser.getLink('Cancel').click() | 38 | >>> owner_browser.getLink('Cancel').click() |
4805 | 39 | >>> owner_browser.open('http://launchpad.test/firefox/+edit') | 39 | >>> owner_browser.open('http://launchpad.test/firefox/+edit') |
4807 | 40 | >>> print owner_browser.title | 40 | >>> print(owner_browser.title) |
4808 | 41 | Change Mozilla Firefox's details... | 41 | Change Mozilla Firefox's details... |
4809 | 42 | 42 | ||
4810 | 43 | >>> owner_browser.getControl('Development focus').value = ['2'] | 43 | >>> owner_browser.getControl('Development focus').value = ['2'] |
4811 | 44 | >>> owner_browser.getControl('Change').click() | 44 | >>> owner_browser.getControl('Change').click() |
4813 | 45 | >>> print owner_browser.title | 45 | >>> print(owner_browser.title) |
4814 | 46 | Mozilla Firefox in Launchpad | 46 | Mozilla Firefox in Launchpad |
4815 | 47 | 47 | ||
4816 | 48 | >>> owner_browser.getLink('All packages').click() | 48 | >>> owner_browser.getLink('All packages').click() |
4817 | @@ -57,35 +57,35 @@ deleted. The milestones and releases are linked. | |||
4818 | 57 | 57 | ||
4819 | 58 | >>> owner_browser.getLink('trunk series').click() | 58 | >>> owner_browser.getLink('trunk series').click() |
4820 | 59 | >>> owner_browser.getLink('Delete series').click() | 59 | >>> owner_browser.getLink('Delete series').click() |
4822 | 60 | >>> print owner_browser.title | 60 | >>> print(owner_browser.title) |
4823 | 61 | Delete Mozilla Firefox trunk series... | 61 | Delete Mozilla Firefox trunk series... |
4824 | 62 | 62 | ||
4825 | 63 | >>> contents = find_main_content(owner_browser.contents) | 63 | >>> contents = find_main_content(owner_browser.contents) |
4827 | 64 | >>> print extract_text(find_tag_by_id(contents, 'milestones-and-files')) | 64 | >>> print(extract_text(find_tag_by_id(contents, 'milestones-and-files'))) |
4828 | 65 | The associated milestones and releases | 65 | The associated milestones and releases |
4829 | 66 | and their files will be also be deleted: | 66 | and their files will be also be deleted: |
4830 | 67 | 67 | ||
4832 | 68 | >>> print extract_text(find_tag_by_id(contents, 'milestones')) | 68 | >>> print(extract_text(find_tag_by_id(contents, 'milestones'))) |
4833 | 69 | 0.9.2 "One (secure) Tree Hill" | 69 | 0.9.2 "One (secure) Tree Hill" |
4834 | 70 | 0.9.1 "One Tree Hill (v2)" | 70 | 0.9.1 "One Tree Hill (v2)" |
4835 | 71 | 0.9 "One Tree Hill" | 71 | 0.9 "One Tree Hill" |
4836 | 72 | 1.0 | 72 | 1.0 |
4837 | 73 | 73 | ||
4839 | 74 | >>> print owner_browser.getLink('0.9.2 "One (secure) Tree Hill"') | 74 | >>> print(owner_browser.getLink('0.9.2 "One (secure) Tree Hill"')) |
4840 | 75 | <Link text='0.9.2 "One (secure) Tree Hill"' ...> | 75 | <Link text='0.9.2 "One (secure) Tree Hill"' ...> |
4841 | 76 | 76 | ||
4843 | 77 | >>> print extract_text(find_tag_by_id(contents, 'files')) | 77 | >>> print(extract_text(find_tag_by_id(contents, 'files'))) |
4844 | 78 | firefox_0.9.2.orig.tar.gz | 78 | firefox_0.9.2.orig.tar.gz |
4845 | 79 | 79 | ||
4848 | 80 | >>> print extract_text( | 80 | >>> print(extract_text( |
4849 | 81 | ... find_tag_by_id(contents, 'bugtasks-and-blueprints')) | 81 | ... find_tag_by_id(contents, 'bugtasks-and-blueprints'))) |
4850 | 82 | Support E4X in EcmaScript | 82 | Support E4X in EcmaScript |
4851 | 83 | 83 | ||
4852 | 84 | The owner deletes the series and the project page is displayed. They read | 84 | The owner deletes the series and the project page is displayed. They read |
4853 | 85 | that the series was deleted, and can not see a link to it anymore. | 85 | that the series was deleted, and can not see a link to it anymore. |
4854 | 86 | 86 | ||
4855 | 87 | >>> owner_browser.getControl('Delete this Series').click() | 87 | >>> owner_browser.getControl('Delete this Series').click() |
4857 | 88 | >>> print owner_browser.title | 88 | >>> print(owner_browser.title) |
4858 | 89 | Mozilla Firefox in Launchpad | 89 | Mozilla Firefox in Launchpad |
4859 | 90 | 90 | ||
4860 | 91 | >>> print_feedback_messages(owner_browser.contents) | 91 | >>> print_feedback_messages(owner_browser.contents) |
4861 | @@ -101,10 +101,10 @@ release manager sees the explanation when they try to delete the series. | |||
4862 | 101 | 101 | ||
4863 | 102 | >>> owner_browser.open('http://launchpad.test/evolution/trunk') | 102 | >>> owner_browser.open('http://launchpad.test/evolution/trunk') |
4864 | 103 | >>> owner_browser.getLink('Delete series').click() | 103 | >>> owner_browser.getLink('Delete series').click() |
4866 | 104 | >>> print owner_browser.title | 104 | >>> print(owner_browser.title) |
4867 | 105 | Delete Evolution trunk series ... | 105 | Delete Evolution trunk series ... |
4868 | 106 | 106 | ||
4871 | 107 | >>> print extract_text( | 107 | >>> print(extract_text( |
4872 | 108 | ... find_tag_by_id(owner_browser.contents, 'cannot-delete')) | 108 | ... find_tag_by_id(owner_browser.contents, 'cannot-delete'))) |
4873 | 109 | You ... | 109 | You ... |
4874 | 110 | This series cannot be deleted because it has translations. | 110 | This series cannot be deleted because it has translations. |
4875 | diff --git a/lib/lp/registry/stories/productseries/xx-productseries-driver.txt b/lib/lp/registry/stories/productseries/xx-productseries-driver.txt | |||
4876 | index bb36017..6910665 100644 | |||
4877 | --- a/lib/lp/registry/stories/productseries/xx-productseries-driver.txt | |||
4878 | +++ b/lib/lp/registry/stories/productseries/xx-productseries-driver.txt | |||
4879 | @@ -8,16 +8,16 @@ by appointing someone else as the driver. | |||
4880 | 8 | >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test') | 8 | >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test') |
4881 | 9 | >>> browser.open('http://launchpad.test/firefox/1.0') | 9 | >>> browser.open('http://launchpad.test/firefox/1.0') |
4882 | 10 | >>> content = find_tag_by_id(browser.contents, 'series-details') | 10 | >>> content = find_tag_by_id(browser.contents, 'series-details') |
4884 | 11 | >>> print extract_text(find_tag_by_id(content, 'series-drivers')) | 11 | >>> print(extract_text(find_tag_by_id(content, 'series-drivers'))) |
4885 | 12 | Project drivers: Sample Person | 12 | Project drivers: Sample Person |
4887 | 13 | >>> print extract_text(find_tag_by_id(content, 'series-release-manager')) | 13 | >>> print(extract_text(find_tag_by_id(content, 'series-release-manager'))) |
4888 | 14 | Release manager: None Appoint release manager | 14 | Release manager: None Appoint release manager |
4889 | 15 | 15 | ||
4890 | 16 | >>> browser.getLink('Appoint release manager').click() | 16 | >>> browser.getLink('Appoint release manager').click() |
4891 | 17 | 17 | ||
4892 | 18 | >>> browser.url | 18 | >>> browser.url |
4893 | 19 | 'http://launchpad.test/firefox/1.0/+driver' | 19 | 'http://launchpad.test/firefox/1.0/+driver' |
4895 | 20 | >>> print browser.title | 20 | >>> print(browser.title) |
4896 | 21 | Appoint the release manager for... | 21 | Appoint the release manager for... |
4897 | 22 | >>> browser.getControl('Release manager').value | 22 | >>> browser.getControl('Release manager').value |
4898 | 23 | '' | 23 | '' |
4899 | @@ -38,8 +38,8 @@ message explains that the driver changed. | |||
4900 | 38 | Sample Person and Guilherme Salgado are listed as the drivers of Firefox 1.0. | 38 | Sample Person and Guilherme Salgado are listed as the drivers of Firefox 1.0. |
4901 | 39 | 39 | ||
4902 | 40 | >>> content = find_tag_by_id(browser.contents, 'series-details') | 40 | >>> content = find_tag_by_id(browser.contents, 'series-details') |
4904 | 41 | >>> print extract_text(find_tag_by_id(content, 'series-drivers')) | 41 | >>> print(extract_text(find_tag_by_id(content, 'series-drivers'))) |
4905 | 42 | Project drivers: Guilherme Salgado, Sample Person | 42 | Project drivers: Guilherme Salgado, Sample Person |
4907 | 43 | >>> print extract_text(find_tag_by_id(content, 'series-release-manager')) | 43 | >>> print(extract_text(find_tag_by_id(content, 'series-release-manager'))) |
4908 | 44 | Release manager: Guilherme Salgado Appoint release manager | 44 | Release manager: Guilherme Salgado Appoint release manager |
4909 | 45 | 45 | ||
4910 | diff --git a/lib/lp/registry/stories/productseries/xx-productseries-index.txt b/lib/lp/registry/stories/productseries/xx-productseries-index.txt | |||
4911 | index bbd88b8..7a4470c 100644 | |||
4912 | --- a/lib/lp/registry/stories/productseries/xx-productseries-index.txt | |||
4913 | +++ b/lib/lp/registry/stories/productseries/xx-productseries-index.txt | |||
4914 | @@ -4,14 +4,14 @@ Product Series Overview | |||
4915 | 4 | The product series overview page summarises the series. | 4 | The product series overview page summarises the series. |
4916 | 5 | 5 | ||
4917 | 6 | >>> anon_browser.open('http://launchpad.test/firefox/trunk') | 6 | >>> anon_browser.open('http://launchpad.test/firefox/trunk') |
4919 | 7 | >>> print extract_text(anon_browser.title) | 7 | >>> print(extract_text(anon_browser.title)) |
4920 | 8 | Series trunk : Mozilla Firefox | 8 | Series trunk : Mozilla Firefox |
4921 | 9 | 9 | ||
4922 | 10 | >>> content = find_main_content(anon_browser.contents) | 10 | >>> content = find_main_content(anon_browser.contents) |
4924 | 11 | >>> print extract_text(content.h1) | 11 | >>> print(extract_text(content.h1)) |
4925 | 12 | Mozilla Firefox trunk series | 12 | Mozilla Firefox trunk series |
4926 | 13 | 13 | ||
4928 | 14 | >>> print extract_text(find_tag_by_id(content, 'series-details')) | 14 | >>> print(extract_text(find_tag_by_id(content, 'series-details'))) |
4929 | 15 | Series information | 15 | Series information |
4930 | 16 | Project: Mozilla Firefox | 16 | Project: Mozilla Firefox |
4931 | 17 | Series: trunk | 17 | Series: trunk |
4932 | @@ -22,7 +22,7 @@ The product series overview page summarises the series. | |||
4933 | 22 | Release URL pattern: None | 22 | Release URL pattern: None |
4934 | 23 | Download RDF metadata | 23 | Download RDF metadata |
4935 | 24 | 24 | ||
4937 | 25 | >>> print extract_text(find_tag_by_id(content, 'description')) | 25 | >>> print(extract_text(find_tag_by_id(content, 'description'))) |
4938 | 26 | The "trunk" series represents the primary line of | 26 | The "trunk" series represents the primary line of |
4939 | 27 | development rather than a stable release branch. This is sometimes | 27 | development rather than a stable release branch. This is sometimes |
4940 | 28 | also called MAIN or HEAD. | 28 | also called MAIN or HEAD. |
4941 | @@ -52,7 +52,7 @@ The series page lists the milestones and releases for the series. | |||
4942 | 52 | 52 | ||
4943 | 53 | >>> rows = find_tag_by_id(content, 'series-trunk').findAll('tr') | 53 | >>> rows = find_tag_by_id(content, 'series-trunk').findAll('tr') |
4944 | 54 | >>> for row in rows[0:2]: | 54 | >>> for row in rows[0:2]: |
4946 | 55 | ... print extract_text(row) | 55 | ... print(extract_text(row)) |
4947 | 56 | Version Expected Released Summary | 56 | Version Expected Released Summary |
4948 | 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 ... |
4949 | 58 | 58 | ||
4950 | @@ -62,7 +62,7 @@ The driver can see a link to set the expected date. | |||
4951 | 62 | >>> driver_rows = find_tag_by_id( | 62 | >>> driver_rows = find_tag_by_id( |
4952 | 63 | ... driver_content, 'series-trunk').findAll('tr') | 63 | ... driver_content, 'series-trunk').findAll('tr') |
4953 | 64 | >>> for row in driver_rows[0:2]: | 64 | >>> for row in driver_rows[0:2]: |
4955 | 65 | ... print extract_text(row) | 65 | ... print(extract_text(row)) |
4956 | 66 | Version Expected Released Summary | 66 | Version Expected Released Summary |
4957 | 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 ... |
4958 | 68 | 68 | ||
4959 | @@ -72,13 +72,13 @@ The driver can see a link to set the expected date. | |||
4960 | 72 | The milestone summary column in the table may also contain a summary of | 72 | The milestone summary column in the table may also contain a summary of |
4961 | 73 | the status of the bugs and blueprints. | 73 | the status of the bugs and blueprints. |
4962 | 74 | 74 | ||
4964 | 75 | >>> print extract_text(rows[-1]) | 75 | >>> print(extract_text(rows[-1])) |
4965 | 76 | Mozilla Firefox 1.0 2056-10-16 not yet released | 76 | Mozilla Firefox 1.0 2056-10-16 not yet released |
4966 | 77 | Blueprints targeted: 1 Unknown | 77 | Blueprints targeted: 1 Unknown |
4967 | 78 | 78 | ||
4968 | 79 | The driver can see a link to create a release for the milestone. | 79 | The driver can see a link to create a release for the milestone. |
4969 | 80 | 80 | ||
4971 | 81 | >>> print extract_text(driver_rows[-1]) | 81 | >>> print(extract_text(driver_rows[-1])) |
4972 | 82 | Mozilla Firefox 1.0 2056-10-16 Release now Blueprints targeted: ... | 82 | Mozilla Firefox 1.0 2056-10-16 Release now Blueprints targeted: ... |
4973 | 83 | 83 | ||
4974 | 84 | >>> driver_browser.getLink('Release now') | 84 | >>> driver_browser.getLink('Release now') |
4975 | @@ -96,13 +96,13 @@ The user can learn where the code of the series is located if a branch | |||
4976 | 96 | is set. Otherwise, there is a message explaining that the information has | 96 | is set. Otherwise, there is a message explaining that the information has |
4977 | 97 | not been set. | 97 | not been set. |
4978 | 98 | 98 | ||
4980 | 99 | >>> print extract_text(find_tag_by_id(content, 'branch-details')) | 99 | >>> print(extract_text(find_tag_by_id(content, 'branch-details'))) |
4981 | 100 | No revision control details recorded for Mozilla Firefox trunk series. | 100 | No revision control details recorded for Mozilla Firefox trunk series. |
4982 | 101 | 101 | ||
4983 | 102 | The driver sees that they can link a branch to this series, and there is | 102 | The driver sees that they can link a branch to this series, and there is |
4984 | 103 | an explanation where they can push the branch. | 103 | an explanation where they can push the branch. |
4985 | 104 | 104 | ||
4987 | 105 | >>> print extract_text(find_tag_by_id(driver_content, 'branch-details')) | 105 | >>> print(extract_text(find_tag_by_id(driver_content, 'branch-details'))) |
4988 | 106 | You haven't yet told Launchpad where your source code is ... | 106 | You haven't yet told Launchpad where your source code is ... |
4989 | 107 | bzr push lp:~name12/firefox/trunk ... | 107 | bzr push lp:~name12/firefox/trunk ... |
4990 | 108 | 108 | ||
4991 | @@ -112,11 +112,11 @@ an explanation where they can push the branch. | |||
4992 | 112 | Distribution packaging is listed too. There is a link to the source package | 112 | Distribution packaging is listed too. There is a link to the source package |
4993 | 113 | in each Ubuntu series. | 113 | in each Ubuntu series. |
4994 | 114 | 114 | ||
4997 | 115 | >>> print extract_text(find_tag_by_id( | 115 | >>> print(extract_text(find_tag_by_id( |
4998 | 116 | ... content, 'distribution-packaging-explanation')) | 116 | ... content, 'distribution-packaging-explanation'))) |
4999 | 117 | This series is packaged in the following distribution series: | 117 | This series is packaged in the following distribution series: |
5000 | 118 | 118 |
The diff has been truncated for viewing.
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.