Merge ~cjwatson/launchpad:zope.testbrowser-4 into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: bd25b825030d697f028b14fd8b70e0da118cb138
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:zope.testbrowser-4
Merge into: launchpad:master
Diff against target: 654 lines (+70/-13)
35 files modified
constraints.txt (+7/-2)
lib/lp/app/stories/basics/max-batch-size.txt (+1/-1)
lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt (+1/-0)
lib/lp/bugs/stories/bug-also-affects/xx-bugtracker-information.txt (+1/-0)
lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt (+1/-0)
lib/lp/bugs/stories/bugs/xx-unique-ids-on-bug-page.txt (+2/-1)
lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt (+1/-0)
lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt (+4/-0)
lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt (+2/-0)
lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt (+3/-0)
lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt (+5/-0)
lib/lp/bugs/stories/guided-filebug/xx-options-for-bug-supervisors.txt (+4/-0)
lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt (+3/-0)
lib/lp/buildmaster/stories/xx-builder-page.txt (+2/-0)
lib/lp/code/stories/branches/xx-branch-edit.txt (+1/-0)
lib/lp/code/stories/branches/xx-branch-listings.txt (+1/-0)
lib/lp/code/stories/codeimport/xx-admin-codeimport.txt (+1/-0)
lib/lp/code/stories/codeimport/xx-edit-codeimport.txt (+1/-0)
lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt (+1/-0)
lib/lp/registry/stories/mailinglists/subscriptions.txt (+5/-0)
lib/lp/registry/stories/product/xx-product-edit.txt (+2/-0)
lib/lp/registry/stories/product/xx-product-files.txt (+2/-0)
lib/lp/registry/stories/project/xx-project-edit.txt (+2/-0)
lib/lp/registry/stories/team-polls/vote-poll.txt (+2/-0)
lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt (+3/-0)
lib/lp/services/profile/profiling.txt (+1/-1)
lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled (+1/-1)
lib/lp/services/webapp/tests/test_login.py (+1/-1)
lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt (+2/-0)
lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt (+1/-0)
lib/lp/testing/browser.py (+1/-1)
lib/lp/testing/layers.py (+2/-2)
lib/lp/testing/pages.py (+1/-1)
lib/lp/testopenid/testing/helpers.py (+1/-1)
setup.py (+1/-1)
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
Review via email: mp+374684@code.launchpad.net

Commit message

Upgrade to zope.testbrowser 4.0.4 and zope.app.testing 3.10.0

This is a stepping stone towards getting rid of zope.app.testing
entirely (although it temporarily uses some new imports from
zope.app.testing, since the old Browser implementation was moved there).
The next step will be to switch over to the WebTest-based Browser
implementation introduced in zope.testbrowser 4, allowing us to stop
using wsgi_intercept.

The test failures are all just because AmbiguityError and LookupError
now show some more helpful details.

To post a comment you must log in.
Revision history for this message
Ioana Lasc (ilasc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/constraints.txt b/constraints.txt
2index 6e53ff4..63b2803 100644
3--- a/constraints.txt
4+++ b/constraints.txt
5@@ -149,7 +149,8 @@ zope.app.debug==3.4.1
6 zope.app.http==3.9.0
7 zope.app.publication==3.12.0
8 zope.app.wsgi==3.10.0
9-zope.testbrowser==3.10.4
10+#zope.testbrowser==3.10.4
11+zope.testbrowser[wsgi]==4.0.4
12
13 # Deprecated
14 roman==1.4.0
15@@ -178,7 +179,8 @@ zope.app.renderer==3.5.1
16 zope.app.rotterdam==3.5.3
17 zope.app.schema==3.5.0
18 zope.app.security==3.7.5
19-zope.app.testing==3.8.1
20+#zope.app.testing==3.8.1
21+zope.app.testing==3.10.0
22 zope.app.zcmlfiles==3.7.1
23 zope.app.zopeappgenerations==3.6.1
24 zope.generations==3.7.1
25@@ -357,6 +359,9 @@ van.testing==3.0.0
26 vine==1.1.4
27 virtualenv-tools3==2.0.0
28 wadllib==1.3.2
29+waitress==1.3.1
30+WebOb==1.8.5
31+WebTest==2.0.33
32 wheel==0.29.0
33 wsgiref==0.1.2
34 z3c.pt==2.2.3
35diff --git a/lib/lp/app/stories/basics/max-batch-size.txt b/lib/lp/app/stories/basics/max-batch-size.txt
36index 1ce24d4..d5e6de5 100644
37--- a/lib/lp/app/stories/basics/max-batch-size.txt
38+++ b/lib/lp/app/stories/basics/max-batch-size.txt
39@@ -5,7 +5,7 @@ batching have a maximum on the batch size. For example, requesting 1000
40 products will display a page telling the users that the batch is too
41 large and what is the current maximum.
42
43- >>> from zope.testbrowser.testing import Browser
44+ >>> from zope.app.testing.testbrowser import Browser
45 >>> anon_browser = Browser()
46 >>> anon_browser.open('http://launchpad.test/projects/+all?start=0&batch=1000')
47 Traceback (most recent call last):
48diff --git a/lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt b/lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt
49index e355523..0e3f41d 100644
50--- a/lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt
51+++ b/lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt
52@@ -258,6 +258,7 @@ package is linked to the evolution upstream product.
53 Traceback (most recent call last):
54 ...
55 LookupError: label u'Project'
56+ ...
57
58 >>> user_browser.getControl(name='field.product').value
59 'evolution'
60diff --git a/lib/lp/bugs/stories/bug-also-affects/xx-bugtracker-information.txt b/lib/lp/bugs/stories/bug-also-affects/xx-bugtracker-information.txt
61index 92e505e..c5329a0 100644
62--- a/lib/lp/bugs/stories/bug-also-affects/xx-bugtracker-information.txt
63+++ b/lib/lp/bugs/stories/bug-also-affects/xx-bugtracker-information.txt
64@@ -53,3 +53,4 @@ appear.
65 Traceback (most recent call last):
66 ...
67 LookupError: name 'field.link_upstream_how'
68+ ...
69diff --git a/lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt b/lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt
70index 0bf88ef..7cf10f5 100644
71--- a/lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt
72+++ b/lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt
73@@ -172,6 +172,7 @@ This specialized list does not include the search form. So there is no
74 Traceback (most recent call last):
75 ...
76 LookupError: label u'Search'
77+ ...
78
79 The 'Report a bug' link is also not present.
80
81diff --git a/lib/lp/bugs/stories/bugs/xx-unique-ids-on-bug-page.txt b/lib/lp/bugs/stories/bugs/xx-unique-ids-on-bug-page.txt
82index f533ef9..f8bf491 100644
83--- a/lib/lp/bugs/stories/bugs/xx-unique-ids-on-bug-page.txt
84+++ b/lib/lp/bugs/stories/bugs/xx-unique-ids-on-bug-page.txt
85@@ -12,7 +12,8 @@ For example, bug one has more than one Package field.
86 >>> user_browser.getControl('Package')
87 Traceback (most recent call last):
88 ...
89- AmbiguityError: label u'Package'
90+ AmbiguityError: label u'Package' matches:
91+ ...
92
93 Still, the ids of the fields are unique.
94
95diff --git a/lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt b/lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt
96index 7468bf3..268d83d 100644
97--- a/lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt
98+++ b/lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt
99@@ -125,6 +125,7 @@ any team and hence does no see the option to asign somebody else.
100 Traceback (most recent call last):
101 ...
102 LookupError: name u'jokosher.assignee'
103+ ...
104
105 Once no_priv is a member of a team, the option is shown.
106
107diff --git a/lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt b/lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
108index e20570a..915c240 100644
109--- a/lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
110+++ b/lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
111@@ -426,6 +426,7 @@ The first and second restrictions both apply to the GNOME Bugzilla:
112 Traceback (most recent call last):
113 ...
114 LookupError: label u'Delete'
115+ ...
116
117 Note how we tell the user about _all_ the restrictions they face. In
118 this instance the user would have the option of persuading the GNOME
119@@ -450,6 +451,7 @@ Tracker:
120 Traceback (most recent call last):
121 ...
122 LookupError: label u'Delete'
123+ ...
124
125 Again, we tell the user about all the restrictions they have stumbled
126 on. A more privileged user would not stumble at the second hurdle,
127@@ -467,6 +469,7 @@ deleting bug watches en masse:
128 Traceback (most recent call last):
129 ...
130 LookupError: label u'Delete'
131+ ...
132
133
134 Disabling a bug tracker
135@@ -483,6 +486,7 @@ Ordinary users can't disable a bug tracker.
136 Traceback (most recent call last):
137 ...
138 LookupError: name u'field.active'
139+ ...
140
141 But admins can.
142
143diff --git a/lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt b/lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt
144index 9edc7b3..f93b229 100644
145--- a/lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt
146+++ b/lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt
147@@ -26,6 +26,7 @@ page. It isn't visible to ordinary users, however.
148 Traceback (most recent call last):
149 ...
150 LookupError: label u'Reschedule all watches'
151+ ...
152
153 However, the reschedule button will appear to administrators.
154
155@@ -80,3 +81,4 @@ appear on the bugtracker page.
156 Traceback (most recent call last):
157 ...
158 LookupError: label u'Reschedule all watches'
159+ ...
160diff --git a/lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt b/lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt
161index af2e56b..2d8bfde 100644
162--- a/lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt
163+++ b/lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt
164@@ -30,6 +30,7 @@ This means that we only display the status, it's not possible to edit it:
165 Traceback (most recent call last):
166 ...
167 LookupError: name u'debian_mozilla-firefox.status'
168+ ...
169
170 Of course we can't edit the importance or assignee either.
171
172@@ -37,11 +38,13 @@ Of course we can't edit the importance or assignee either.
173 Traceback (most recent call last):
174 ...
175 LookupError: name u'debian_mozilla-firefox.importance'
176+ ...
177
178 >>> browser.getControl(name='debian_mozilla-firefox.assignee')
179 Traceback (most recent call last):
180 ...
181 LookupError: name u'debian_mozilla-firefox.assignee'
182+ ...
183
184 If we remove the bug watch, we'll be able to edit the status, which has
185 been reset to New.
186diff --git a/lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt b/lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt
187index c21f6ed..fa54876 100644
188--- a/lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt
189+++ b/lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt
190@@ -170,6 +170,7 @@ For a new watch, the "Update Now" button isn't shown.
191 Traceback (most recent call last):
192 ...
193 LookupError: label u'Update Now'
194+ ...
195
196 If the watch has been checked but has never failed, the button will
197 remain hidden.
198@@ -183,6 +184,7 @@ remain hidden.
199 Traceback (most recent call last):
200 ...
201 LookupError: label u'Update Now'
202+ ...
203
204 If the watch has failed less than 60% of its recent checks, the button
205 will appear on the page.
206@@ -224,6 +226,7 @@ The button will no longer be shown on the page.
207 Traceback (most recent call last):
208 ...
209 LookupError: label u'Update Now'
210+ ...
211
212 If a watch has run once and failed once, the reschedule button will be
213 shown.
214@@ -264,6 +267,7 @@ watch for checking.
215 Traceback (most recent call last):
216 ...
217 LookupError: label u'Update Now'
218+ ...
219
220
221 Resetting a watch
222@@ -320,3 +324,4 @@ button will not appear.
223 Traceback (most recent call last):
224 ...
225 LookupError: label u'Reset this watch'
226+ ...
227diff --git a/lib/lp/bugs/stories/guided-filebug/xx-options-for-bug-supervisors.txt b/lib/lp/bugs/stories/guided-filebug/xx-options-for-bug-supervisors.txt
228index 25f9ca9..d3ec219 100644
229--- a/lib/lp/bugs/stories/guided-filebug/xx-options-for-bug-supervisors.txt
230+++ b/lib/lp/bugs/stories/guided-filebug/xx-options-for-bug-supervisors.txt
231@@ -14,21 +14,25 @@ Users who are not bug supervisors do not see any of these options:
232 Traceback (most recent call last):
233 ...
234 LookupError: label u'Status'
235+ ...
236
237 >>> user_browser.getControl('Importance')
238 Traceback (most recent call last):
239 ...
240 LookupError: label u'Importance'
241+ ...
242
243 >>> user_browser.getControl('Milestone')
244 Traceback (most recent call last):
245 ...
246 LookupError: label u'Milestone'
247+ ...
248
249 >>> user_browser.getControl('Assign to')
250 Traceback (most recent call last):
251 ...
252 LookupError: label u'Assign to'
253+ ...
254
255 Users who are bug supervisors can see these options:
256
257diff --git a/lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt b/lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt
258index 830e72f..9be1212 100644
259--- a/lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt
260+++ b/lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt
261@@ -146,6 +146,7 @@ the page.
262 Traceback (most recent call last):
263 ...
264 LookupError: label u'\xa0No Privileges Person'
265+ ...
266
267 We clean up by removing Sample Person as the distribution driver.
268
269@@ -188,11 +189,13 @@ the UI elements for the subscription/unsubscription of arbitrary persons.
270 Traceback (most recent call last):
271 ...
272 LookupError: label u'Subscribe someone else:'
273+ ...
274
275 >>> print(browser.getControl('\xa0Foo Bar'))
276 Traceback (most recent call last):
277 ...
278 LookupError: label u'\xa0Foo Bar'
279+ ...
280
281
282 Distribution with a bug supervisor
283diff --git a/lib/lp/buildmaster/stories/xx-builder-page.txt b/lib/lp/buildmaster/stories/xx-builder-page.txt
284index a7e386f..bde5653 100644
285--- a/lib/lp/buildmaster/stories/xx-builder-page.txt
286+++ b/lib/lp/buildmaster/stories/xx-builder-page.txt
287@@ -296,6 +296,7 @@ Nor is the toggle mode control included on the index page.
288 >>> user_browser.getControl(name="field.actions.update")
289 Traceback (most recent call last):
290 LookupError: name 'field.actions.update'
291+ ...
292
293 Nor can they access the edit page directly via URL.
294
295@@ -314,6 +315,7 @@ The same is true for the anonymous user:
296 >>> anon_browser.getControl(name="field.actions.update")
297 Traceback (most recent call last):
298 LookupError: name 'field.actions.update'
299+ ...
300
301 >>> anon_browser.open("http://localhost/+builds/bob/+edit")
302 Traceback (most recent call last):
303diff --git a/lib/lp/code/stories/branches/xx-branch-edit.txt b/lib/lp/code/stories/branches/xx-branch-edit.txt
304index 47b31a4..1142650 100644
305--- a/lib/lp/code/stories/branches/xx-branch-edit.txt
306+++ b/lib/lp/code/stories/branches/xx-branch-edit.txt
307@@ -218,6 +218,7 @@ Check that when editing a hosted branch the URL field is not shown.
308 Traceback (most recent call last):
309 ...
310 LookupError: label u'Branch URL'
311+ ...
312
313
314 Editing the whiteboard
315diff --git a/lib/lp/code/stories/branches/xx-branch-listings.txt b/lib/lp/code/stories/branches/xx-branch-listings.txt
316index 3e2ac74..16e18a8 100644
317--- a/lib/lp/code/stories/branches/xx-branch-listings.txt
318+++ b/lib/lp/code/stories/branches/xx-branch-listings.txt
319@@ -329,6 +329,7 @@ The implicitly sorted listings do not have an ordering widget at all.
320 Traceback (most recent call last):
321 ...
322 LookupError: name u'field.sort_by'
323+ ...
324
325 Finally, sorting by a particular criterion has the desired effect.
326
327diff --git a/lib/lp/code/stories/codeimport/xx-admin-codeimport.txt b/lib/lp/code/stories/codeimport/xx-admin-codeimport.txt
328index 3cd6e3b..7c9fbf4 100644
329--- a/lib/lp/code/stories/codeimport/xx-admin-codeimport.txt
330+++ b/lib/lp/code/stories/codeimport/xx-admin-codeimport.txt
331@@ -334,6 +334,7 @@ Anonymous users cannot see this button.
332 Traceback (most recent call last):
333 ...
334 LookupError: label u'Import Now'
335+ ...
336
337 If the logged in user clicks this button, the import will be scheduled
338 to run ASAP and the fact that the import has been requested is
339diff --git a/lib/lp/code/stories/codeimport/xx-edit-codeimport.txt b/lib/lp/code/stories/codeimport/xx-edit-codeimport.txt
340index e2fc2c8..2f65697 100644
341--- a/lib/lp/code/stories/codeimport/xx-edit-codeimport.txt
342+++ b/lib/lp/code/stories/codeimport/xx-edit-codeimport.txt
343@@ -130,6 +130,7 @@ Anonymous users cannot see this button.
344 Traceback (most recent call last):
345 ...
346 LookupError: label u'Import Now'
347+ ...
348
349 If the logged in user clicks this button, the import will be scheduled
350 to run ASAP and the fact that the import has been requested is
351diff --git a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
352index a9bd30b..34ab34c 100644
353--- a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
354+++ b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
355@@ -35,6 +35,7 @@ Start out with a clean page containing no imported keys:
356 Traceback (most recent call last):
357 ...
358 LookupError: name 'DEACTIVATE_GPGKEY'
359+ ...
360
361 Claim OpenPGP key:
362
363diff --git a/lib/lp/registry/stories/mailinglists/subscriptions.txt b/lib/lp/registry/stories/mailinglists/subscriptions.txt
364index 75c4133..f1f7c3f 100644
365--- a/lib/lp/registry/stories/mailinglists/subscriptions.txt
366+++ b/lib/lp/registry/stories/mailinglists/subscriptions.txt
367@@ -116,6 +116,7 @@ not been completed (specifically, Mailman hasn't constructed it yet).
368 Traceback (most recent call last):
369 ...
370 LookupError: name 'field.subscription.testing-spanish-team'
371+ ...
372
373 Carlos can subscribe to a list using his preferred email address. Such
374 subscriptions will track changes to his preferred address without requiring
375@@ -245,6 +246,7 @@ screen.
376 Traceback (most recent call last):
377 ...
378 LookupError: name 'field.subscription.rosetta-admins'
379+ ...
380
381 Jdub will become a member of the team's mailing list as soon as he has
382 been approved for the team.
383@@ -286,6 +288,7 @@ list is not presented.
384 Traceback (most recent call last):
385 ...
386 LookupError: name 'mailinglist_subscribe'
387+ ...
388
389 Of course, the option to subscribe to the mailing list isn't present
390 for teams that don't have mailing lists.
391@@ -299,6 +302,7 @@ for teams that don't have mailing lists.
392 Traceback (most recent call last):
393 ...
394 LookupError: name 'mailinglist_subscribe'
395+ ...
396
397 And the option is also missing from the sign-up pages of teams that
398 have restricted membership. (Note that we can only see the join page
399@@ -313,6 +317,7 @@ Overview.)
400 Traceback (most recent call last):
401 ...
402 LookupError: name 'mailinglist_subscribe'
403+ ...
404
405
406 Team page quick-links
407diff --git a/lib/lp/registry/stories/product/xx-product-edit.txt b/lib/lp/registry/stories/product/xx-product-edit.txt
408index 5116faf..28a6cef 100644
409--- a/lib/lp/registry/stories/product/xx-product-edit.txt
410+++ b/lib/lp/registry/stories/product/xx-product-edit.txt
411@@ -199,10 +199,12 @@ registrant fields.
412 Traceback (most recent call last):
413 ...
414 LookupError: label 'Maintainer'
415+ ...
416 >>> browser.getControl('Registrant')
417 Traceback (most recent call last):
418 ...
419 LookupError: label 'Registrant'
420+ ...
421
422 But registry experts can change a product name and set an alias.
423
424diff --git a/lib/lp/registry/stories/product/xx-product-files.txt b/lib/lp/registry/stories/product/xx-product-files.txt
425index 0743bf8..02e6813 100644
426--- a/lib/lp/registry/stories/product/xx-product-files.txt
427+++ b/lib/lp/registry/stories/product/xx-product-files.txt
428@@ -123,6 +123,7 @@ A project owner should not see the delete button when there are no files.
429 Traceback (most recent call last):
430 ...
431 LookupError: label 'Delete Files'
432+ ...
433
434
435 The download file layout
436@@ -474,6 +475,7 @@ And no "Delete Files" button is shown.
437 Traceback (most recent call last):
438 ...
439 LookupError: label 'Delete Files'
440+ ...
441
442 As with the other listing, the administrators have the option to
443 delete files. In this context the 'Release' column would be redundant
444diff --git a/lib/lp/registry/stories/project/xx-project-edit.txt b/lib/lp/registry/stories/project/xx-project-edit.txt
445index f677c6e..ad2a45c 100644
446--- a/lib/lp/registry/stories/project/xx-project-edit.txt
447+++ b/lib/lp/registry/stories/project/xx-project-edit.txt
448@@ -145,10 +145,12 @@ there are fewer fields available.
449 Traceback (most recent call last):
450 ...
451 LookupError: label 'Maintainer'
452+ ...
453 >>> expert_browser.getControl('Registrant')
454 Traceback (most recent call last):
455 ...
456 LookupError: label 'Registrant'
457+ ...
458
459 >>> expert_browser.getControl('Name').value = 'newer-name'
460 >>> expert_browser.getControl('Aliases').value = 'sleepy'
461diff --git a/lib/lp/registry/stories/team-polls/vote-poll.txt b/lib/lp/registry/stories/team-polls/vote-poll.txt
462index 31b3803..603561d 100644
463--- a/lib/lp/registry/stories/team-polls/vote-poll.txt
464+++ b/lib/lp/registry/stories/team-polls/vote-poll.txt
465@@ -143,6 +143,7 @@ It's not possible to vote on closed polls, even if we manually craft the URL.
466 Traceback (most recent call last):
467 ...
468 LookupError: name 'continue'
469+ ...
470
471 The same is true for condorcet polls too.
472
473@@ -159,6 +160,7 @@ The same is true for condorcet polls too.
474 Traceback (most recent call last):
475 ...
476 LookupError: name 'continue'
477+ ...
478
479 >>> team_admin_browser.open(
480 ... 'http://launchpad.test/~ubuntu-team/+poll/director-2004/+vote')
481diff --git a/lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt b/lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt
482index 34b9c22..c7113c5 100644
483--- a/lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt
484+++ b/lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt
485@@ -41,6 +41,7 @@ membership can't be renewed and explain why.
486 Traceback (most recent call last):
487 ...
488 LookupError: label 'Renew'
489+ ...
490 >>> print extract_text(find_tag_by_id(browser.contents, 'maincontent'))
491 Renew membership of Karl Tilbury in Mirror Administrators
492 This membership cannot be renewed because Mirror Administrators
493@@ -70,6 +71,7 @@ the user to renew that membership because it's not about to expire.
494 Traceback (most recent call last):
495 ...
496 LookupError: label 'Renew'
497+ ...
498 >>> print extract_text(find_tag_by_id(browser.contents, 'maincontent'))
499 Renew membership of Karl Tilbury in Mirror Administrators
500 This membership cannot be renewed because it is not set to expire in
501@@ -126,6 +128,7 @@ Karl can't renew it again, since it's now not set to expire soon.
502 Traceback (most recent call last):
503 ...
504 LookupError: label 'Renew'
505+ ...
506 >>> print extract_text(find_tag_by_id(browser.contents, 'maincontent'))
507 Renew membership of Karl Tilbury in Mirror Administrators
508 This membership cannot be renewed because it is not set to expire in
509diff --git a/lib/lp/services/profile/profiling.txt b/lib/lp/services/profile/profiling.txt
510index 86876f0..208fd1f 100644
511--- a/lib/lp/services/profile/profiling.txt
512+++ b/lib/lp/services/profile/profiling.txt
513@@ -55,7 +55,7 @@ that takes care of profiling (among other things).
514
515 Requests made with a testbrowser will also be profiled.
516
517- >>> from zope.testbrowser.testing import Browser
518+ >>> from zope.app.testing.testbrowser import Browser
519 >>> browser = Browser()
520 >>> browser.open('http://launchpad.test/')
521 >>> len(PageTestLayer.profiler.getstats()) > profile_count
522diff --git a/lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled b/lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled
523index 916dc59..e6647cf 100644
524--- a/lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled
525+++ b/lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled
526@@ -17,7 +17,7 @@ First we create a view that will provoke a TimeoutError, a view for the
527 exception, and a time machine.
528
529 >>> from zope.publisher.browser import BrowserView
530- >>> from zope.testbrowser.testing import Browser
531+ >>> from zope.app.testing.testbrowser import Browser
532 >>> from textwrap import dedent
533 >>> from zope.publisher.interfaces.browser import (
534 ... IBrowserRequest, IBrowserView, IBrowserPublisher)
535diff --git a/lib/lp/services/webapp/tests/test_login.py b/lib/lp/services/webapp/tests/test_login.py
536index 1a7dfad..2ae9c2e 100644
537--- a/lib/lp/services/webapp/tests/test_login.py
538+++ b/lib/lp/services/webapp/tests/test_login.py
539@@ -39,11 +39,11 @@ from testtools.matchers import (
540 Equals,
541 MatchesListwise,
542 )
543+from zope.app.testing.testbrowser import Browser as TestBrowser
544 from zope.component import getUtility
545 from zope.security.management import newInteraction
546 from zope.security.proxy import removeSecurityProxy
547 from zope.session.interfaces import ISession
548-from zope.testbrowser.testing import Browser as TestBrowser
549
550 from lp.registry.interfaces.person import IPerson
551 from lp.services.database.interfaces import (
552diff --git a/lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt b/lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt
553index 774408d..f22cd6b 100644
554--- a/lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt
555+++ b/lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt
556@@ -270,6 +270,7 @@ Similarly to users, teams with active PPAs cannot be renamed either.
557 Traceback (most recent call last):
558 ...
559 LookupError: name u'field.name'
560+ ...
561
562 >>> print(extract_text(
563 ... first_tag_by_class(sample_browser.contents, 'form')))
564@@ -557,6 +558,7 @@ all their PPAs.
565 Traceback (most recent call last):
566 ...
567 LookupError: name u'field.accepted'
568+ ...
569
570 >>> print(extract_text(
571 ... first_tag_by_class(cprov_browser.contents, 'form')))
572diff --git a/lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt b/lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
573index 93ad606..6b1a2a2 100644
574--- a/lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
575+++ b/lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
576@@ -106,6 +106,7 @@ The 'search' form is also suppresed.
577 Traceback (most recent call last):
578 ...
579 LookupError: label u'Search'
580+ ...
581
582
583 == Searching PPAs ==
584diff --git a/lib/lp/testing/browser.py b/lib/lp/testing/browser.py
585index d749607..e858d95 100644
586--- a/lib/lp/testing/browser.py
587+++ b/lib/lp/testing/browser.py
588@@ -8,7 +8,7 @@ is used in tests which utilize the AppServerLayer to run the app server in a
589 child process. The Zope testing browser fakes its connections in-process, so
590 that's not good enough.
591
592-The browser provided here extends `zope.testbrowser.testing.Browser` by
593+The browser provided here extends `zope.app.testing.testbrowser.Browser` by
594 providing a close() method that delegates to the underlying mechanize browser,
595 and it tracks all Browser instances to ensure that they are closed. This
596 latter prevents open socket leaks even when the doctest doesn't explicitly
597diff --git a/lib/lp/testing/layers.py b/lib/lp/testing/layers.py
598index 0f00f62..3ec422f 100644
599--- a/lib/lp/testing/layers.py
600+++ b/lib/lp/testing/layers.py
601@@ -1021,8 +1021,8 @@ def wsgi_application(environ, start_response):
602 request, handle_errors=handle_errors)
603 response = request.response
604 # We sort these, and then put the status first, because
605- # zope.testbrowser.testing does--and because it makes it easier to write
606- # reliable tests.
607+ # zope.app.testing.testbrowser does--and because it makes it easier to
608+ # write reliable tests.
609 headers = sorted(response.getHeaders())
610 status = response.getStatusString()
611 headers.insert(0, ('Status', status))
612diff --git a/lib/lp/testing/pages.py b/lib/lp/testing/pages.py
613index 9e1b0c3..e7c2fc3 100644
614--- a/lib/lp/testing/pages.py
615+++ b/lib/lp/testing/pages.py
616@@ -49,11 +49,11 @@ from zope.app.testing.functional import (
617 HTTPCaller,
618 SimpleCookie,
619 )
620+from zope.app.testing.testbrowser import Browser
621 from zope.component import getUtility
622 from zope.security.management import setSecurityPolicy
623 from zope.security.proxy import removeSecurityProxy
624 from zope.session.interfaces import ISession
625-from zope.testbrowser.testing import Browser
626
627 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
628 from lp.registry.errors import NameAlreadyTaken
629diff --git a/lib/lp/testopenid/testing/helpers.py b/lib/lp/testopenid/testing/helpers.py
630index 9f9abd5..bed30cb 100644
631--- a/lib/lp/testopenid/testing/helpers.py
632+++ b/lib/lp/testopenid/testing/helpers.py
633@@ -21,7 +21,7 @@ from openid.consumer.discover import (
634 OPENID_IDP_2_0_TYPE,
635 OpenIDServiceEndpoint,
636 )
637-from zope.testbrowser.testing import PublisherConnection
638+from zope.app.testing.testbrowser import PublisherConnection
639
640 from lp.services.webapp import LaunchpadView
641 from lp.testopenid.interfaces.server import get_server_url
642diff --git a/setup.py b/setup.py
643index e1b28e3..a8a06bd 100644
644--- a/setup.py
645+++ b/setup.py
646@@ -270,7 +270,7 @@ setup(
647 'zope.session',
648 'zope.tal',
649 'zope.tales',
650- 'zope.testbrowser',
651+ 'zope.testbrowser[wsgi]',
652 'zope.testing',
653 'zope.testrunner[subunit]',
654 'zope.traversing',

Subscribers

People subscribed via source and target branches

to status/vote changes: