launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24090
[Merge] ~cjwatson/launchpad:zope.testbrowser-4 into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:zope.testbrowser-4 into launchpad:master.
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.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/374684
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:zope.testbrowser-4 into launchpad:master.
diff --git a/constraints.txt b/constraints.txt
index 6e53ff4..63b2803 100644
--- a/constraints.txt
+++ b/constraints.txt
@@ -149,7 +149,8 @@ zope.app.debug==3.4.1
zope.app.http==3.9.0
zope.app.publication==3.12.0
zope.app.wsgi==3.10.0
-zope.testbrowser==3.10.4
+#zope.testbrowser==3.10.4
+zope.testbrowser[wsgi]==4.0.4
# Deprecated
roman==1.4.0
@@ -178,7 +179,8 @@ zope.app.renderer==3.5.1
zope.app.rotterdam==3.5.3
zope.app.schema==3.5.0
zope.app.security==3.7.5
-zope.app.testing==3.8.1
+#zope.app.testing==3.8.1
+zope.app.testing==3.10.0
zope.app.zcmlfiles==3.7.1
zope.app.zopeappgenerations==3.6.1
zope.generations==3.7.1
@@ -357,6 +359,9 @@ van.testing==3.0.0
vine==1.1.4
virtualenv-tools3==2.0.0
wadllib==1.3.2
+waitress==1.3.1
+WebOb==1.8.5
+WebTest==2.0.33
wheel==0.29.0
wsgiref==0.1.2
z3c.pt==2.2.3
diff --git a/lib/lp/app/stories/basics/max-batch-size.txt b/lib/lp/app/stories/basics/max-batch-size.txt
index 1ce24d4..d5e6de5 100644
--- a/lib/lp/app/stories/basics/max-batch-size.txt
+++ b/lib/lp/app/stories/basics/max-batch-size.txt
@@ -5,7 +5,7 @@ batching have a maximum on the batch size. For example, requesting 1000
products will display a page telling the users that the batch is too
large and what is the current maximum.
- >>> from zope.testbrowser.testing import Browser
+ >>> from zope.app.testing.testbrowser import Browser
>>> anon_browser = Browser()
>>> anon_browser.open('http://launchpad.test/projects/+all?start=0&batch=1000')
Traceback (most recent call last):
diff --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
index e355523..0e3f41d 100644
--- 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
@@ -258,6 +258,7 @@ package is linked to the evolution upstream product.
Traceback (most recent call last):
...
LookupError: label u'Project'
+ ...
>>> user_browser.getControl(name='field.product').value
'evolution'
diff --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
index 92e505e..c5329a0 100644
--- a/lib/lp/bugs/stories/bug-also-affects/xx-bugtracker-information.txt
+++ b/lib/lp/bugs/stories/bug-also-affects/xx-bugtracker-information.txt
@@ -53,3 +53,4 @@ appear.
Traceback (most recent call last):
...
LookupError: name 'field.link_upstream_how'
+ ...
diff --git a/lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt b/lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt
index 0bf88ef..7cf10f5 100644
--- a/lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt
+++ b/lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt
@@ -172,6 +172,7 @@ This specialized list does not include the search form. So there is no
Traceback (most recent call last):
...
LookupError: label u'Search'
+ ...
The 'Report a bug' link is also not present.
diff --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
index f533ef9..f8bf491 100644
--- 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
@@ -12,7 +12,8 @@ For example, bug one has more than one Package field.
>>> user_browser.getControl('Package')
Traceback (most recent call last):
...
- AmbiguityError: label u'Package'
+ AmbiguityError: label u'Package' matches:
+ ...
Still, the ids of the fields are unique.
diff --git a/lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt b/lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt
index 7468bf3..268d83d 100644
--- a/lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt
+++ b/lib/lp/bugs/stories/bugtask-management/xx-change-assignee.txt
@@ -125,6 +125,7 @@ any team and hence does no see the option to asign somebody else.
Traceback (most recent call last):
...
LookupError: name u'jokosher.assignee'
+ ...
Once no_priv is a member of a team, the option is shown.
diff --git a/lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt b/lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
index e20570a..915c240 100644
--- a/lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
+++ b/lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
@@ -426,6 +426,7 @@ The first and second restrictions both apply to the GNOME Bugzilla:
Traceback (most recent call last):
...
LookupError: label u'Delete'
+ ...
Note how we tell the user about _all_ the restrictions they face. In
this instance the user would have the option of persuading the GNOME
@@ -450,6 +451,7 @@ Tracker:
Traceback (most recent call last):
...
LookupError: label u'Delete'
+ ...
Again, we tell the user about all the restrictions they have stumbled
on. A more privileged user would not stumble at the second hurdle,
@@ -467,6 +469,7 @@ deleting bug watches en masse:
Traceback (most recent call last):
...
LookupError: label u'Delete'
+ ...
Disabling a bug tracker
@@ -483,6 +486,7 @@ Ordinary users can't disable a bug tracker.
Traceback (most recent call last):
...
LookupError: name u'field.active'
+ ...
But admins can.
diff --git a/lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt b/lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt
index 9edc7b3..f93b229 100644
--- a/lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt
+++ b/lib/lp/bugs/stories/bugtracker/xx-reschedule-all-watches.txt
@@ -26,6 +26,7 @@ page. It isn't visible to ordinary users, however.
Traceback (most recent call last):
...
LookupError: label u'Reschedule all watches'
+ ...
However, the reschedule button will appear to administrators.
@@ -80,3 +81,4 @@ appear on the bugtracker page.
Traceback (most recent call last):
...
LookupError: label u'Reschedule all watches'
+ ...
diff --git a/lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt b/lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt
index af2e56b..2d8bfde 100644
--- a/lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt
+++ b/lib/lp/bugs/stories/bugwatches/xx-bugtask-bugwatch-linkage.txt
@@ -30,6 +30,7 @@ This means that we only display the status, it's not possible to edit it:
Traceback (most recent call last):
...
LookupError: name u'debian_mozilla-firefox.status'
+ ...
Of course we can't edit the importance or assignee either.
@@ -37,11 +38,13 @@ Of course we can't edit the importance or assignee either.
Traceback (most recent call last):
...
LookupError: name u'debian_mozilla-firefox.importance'
+ ...
>>> browser.getControl(name='debian_mozilla-firefox.assignee')
Traceback (most recent call last):
...
LookupError: name u'debian_mozilla-firefox.assignee'
+ ...
If we remove the bug watch, we'll be able to edit the status, which has
been reset to New.
diff --git a/lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt b/lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt
index c21f6ed..fa54876 100644
--- a/lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt
+++ b/lib/lp/bugs/stories/bugwatches/xx-edit-bugwatch.txt
@@ -170,6 +170,7 @@ For a new watch, the "Update Now" button isn't shown.
Traceback (most recent call last):
...
LookupError: label u'Update Now'
+ ...
If the watch has been checked but has never failed, the button will
remain hidden.
@@ -183,6 +184,7 @@ remain hidden.
Traceback (most recent call last):
...
LookupError: label u'Update Now'
+ ...
If the watch has failed less than 60% of its recent checks, the button
will appear on the page.
@@ -224,6 +226,7 @@ The button will no longer be shown on the page.
Traceback (most recent call last):
...
LookupError: label u'Update Now'
+ ...
If a watch has run once and failed once, the reschedule button will be
shown.
@@ -264,6 +267,7 @@ watch for checking.
Traceback (most recent call last):
...
LookupError: label u'Update Now'
+ ...
Resetting a watch
@@ -320,3 +324,4 @@ button will not appear.
Traceback (most recent call last):
...
LookupError: label u'Reset this watch'
+ ...
diff --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
index 25f9ca9..d3ec219 100644
--- 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
@@ -14,21 +14,25 @@ Users who are not bug supervisors do not see any of these options:
Traceback (most recent call last):
...
LookupError: label u'Status'
+ ...
>>> user_browser.getControl('Importance')
Traceback (most recent call last):
...
LookupError: label u'Importance'
+ ...
>>> user_browser.getControl('Milestone')
Traceback (most recent call last):
...
LookupError: label u'Milestone'
+ ...
>>> user_browser.getControl('Assign to')
Traceback (most recent call last):
...
LookupError: label u'Assign to'
+ ...
Users who are bug supervisors can see these options:
diff --git a/lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt b/lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt
index 830e72f..9be1212 100644
--- a/lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt
+++ b/lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt
@@ -146,6 +146,7 @@ the page.
Traceback (most recent call last):
...
LookupError: label u'\xa0No Privileges Person'
+ ...
We clean up by removing Sample Person as the distribution driver.
@@ -188,11 +189,13 @@ the UI elements for the subscription/unsubscription of arbitrary persons.
Traceback (most recent call last):
...
LookupError: label u'Subscribe someone else:'
+ ...
>>> print(browser.getControl('\xa0Foo Bar'))
Traceback (most recent call last):
...
LookupError: label u'\xa0Foo Bar'
+ ...
Distribution with a bug supervisor
diff --git a/lib/lp/buildmaster/stories/xx-builder-page.txt b/lib/lp/buildmaster/stories/xx-builder-page.txt
index a7e386f..bde5653 100644
--- a/lib/lp/buildmaster/stories/xx-builder-page.txt
+++ b/lib/lp/buildmaster/stories/xx-builder-page.txt
@@ -296,6 +296,7 @@ Nor is the toggle mode control included on the index page.
>>> user_browser.getControl(name="field.actions.update")
Traceback (most recent call last):
LookupError: name 'field.actions.update'
+ ...
Nor can they access the edit page directly via URL.
@@ -314,6 +315,7 @@ The same is true for the anonymous user:
>>> anon_browser.getControl(name="field.actions.update")
Traceback (most recent call last):
LookupError: name 'field.actions.update'
+ ...
>>> anon_browser.open("http://localhost/+builds/bob/+edit")
Traceback (most recent call last):
diff --git a/lib/lp/code/stories/branches/xx-branch-edit.txt b/lib/lp/code/stories/branches/xx-branch-edit.txt
index 47b31a4..1142650 100644
--- a/lib/lp/code/stories/branches/xx-branch-edit.txt
+++ b/lib/lp/code/stories/branches/xx-branch-edit.txt
@@ -218,6 +218,7 @@ Check that when editing a hosted branch the URL field is not shown.
Traceback (most recent call last):
...
LookupError: label u'Branch URL'
+ ...
Editing the whiteboard
diff --git a/lib/lp/code/stories/branches/xx-branch-listings.txt b/lib/lp/code/stories/branches/xx-branch-listings.txt
index 3e2ac74..16e18a8 100644
--- a/lib/lp/code/stories/branches/xx-branch-listings.txt
+++ b/lib/lp/code/stories/branches/xx-branch-listings.txt
@@ -329,6 +329,7 @@ The implicitly sorted listings do not have an ordering widget at all.
Traceback (most recent call last):
...
LookupError: name u'field.sort_by'
+ ...
Finally, sorting by a particular criterion has the desired effect.
diff --git a/lib/lp/code/stories/codeimport/xx-admin-codeimport.txt b/lib/lp/code/stories/codeimport/xx-admin-codeimport.txt
index 3cd6e3b..7c9fbf4 100644
--- a/lib/lp/code/stories/codeimport/xx-admin-codeimport.txt
+++ b/lib/lp/code/stories/codeimport/xx-admin-codeimport.txt
@@ -334,6 +334,7 @@ Anonymous users cannot see this button.
Traceback (most recent call last):
...
LookupError: label u'Import Now'
+ ...
If the logged in user clicks this button, the import will be scheduled
to run ASAP and the fact that the import has been requested is
diff --git a/lib/lp/code/stories/codeimport/xx-edit-codeimport.txt b/lib/lp/code/stories/codeimport/xx-edit-codeimport.txt
index e2fc2c8..2f65697 100644
--- a/lib/lp/code/stories/codeimport/xx-edit-codeimport.txt
+++ b/lib/lp/code/stories/codeimport/xx-edit-codeimport.txt
@@ -130,6 +130,7 @@ Anonymous users cannot see this button.
Traceback (most recent call last):
...
LookupError: label u'Import Now'
+ ...
If the logged in user clicks this button, the import will be scheduled
to run ASAP and the fact that the import has been requested is
diff --git a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
index a9bd30b..34ab34c 100644
--- a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
+++ b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
@@ -35,6 +35,7 @@ Start out with a clean page containing no imported keys:
Traceback (most recent call last):
...
LookupError: name 'DEACTIVATE_GPGKEY'
+ ...
Claim OpenPGP key:
diff --git a/lib/lp/registry/stories/mailinglists/subscriptions.txt b/lib/lp/registry/stories/mailinglists/subscriptions.txt
index 75c4133..f1f7c3f 100644
--- a/lib/lp/registry/stories/mailinglists/subscriptions.txt
+++ b/lib/lp/registry/stories/mailinglists/subscriptions.txt
@@ -116,6 +116,7 @@ not been completed (specifically, Mailman hasn't constructed it yet).
Traceback (most recent call last):
...
LookupError: name 'field.subscription.testing-spanish-team'
+ ...
Carlos can subscribe to a list using his preferred email address. Such
subscriptions will track changes to his preferred address without requiring
@@ -245,6 +246,7 @@ screen.
Traceback (most recent call last):
...
LookupError: name 'field.subscription.rosetta-admins'
+ ...
Jdub will become a member of the team's mailing list as soon as he has
been approved for the team.
@@ -286,6 +288,7 @@ list is not presented.
Traceback (most recent call last):
...
LookupError: name 'mailinglist_subscribe'
+ ...
Of course, the option to subscribe to the mailing list isn't present
for teams that don't have mailing lists.
@@ -299,6 +302,7 @@ for teams that don't have mailing lists.
Traceback (most recent call last):
...
LookupError: name 'mailinglist_subscribe'
+ ...
And the option is also missing from the sign-up pages of teams that
have restricted membership. (Note that we can only see the join page
@@ -313,6 +317,7 @@ Overview.)
Traceback (most recent call last):
...
LookupError: name 'mailinglist_subscribe'
+ ...
Team page quick-links
diff --git a/lib/lp/registry/stories/product/xx-product-edit.txt b/lib/lp/registry/stories/product/xx-product-edit.txt
index 5116faf..28a6cef 100644
--- a/lib/lp/registry/stories/product/xx-product-edit.txt
+++ b/lib/lp/registry/stories/product/xx-product-edit.txt
@@ -199,10 +199,12 @@ registrant fields.
Traceback (most recent call last):
...
LookupError: label 'Maintainer'
+ ...
>>> browser.getControl('Registrant')
Traceback (most recent call last):
...
LookupError: label 'Registrant'
+ ...
But registry experts can change a product name and set an alias.
diff --git a/lib/lp/registry/stories/product/xx-product-files.txt b/lib/lp/registry/stories/product/xx-product-files.txt
index 0743bf8..02e6813 100644
--- a/lib/lp/registry/stories/product/xx-product-files.txt
+++ b/lib/lp/registry/stories/product/xx-product-files.txt
@@ -123,6 +123,7 @@ A project owner should not see the delete button when there are no files.
Traceback (most recent call last):
...
LookupError: label 'Delete Files'
+ ...
The download file layout
@@ -474,6 +475,7 @@ And no "Delete Files" button is shown.
Traceback (most recent call last):
...
LookupError: label 'Delete Files'
+ ...
As with the other listing, the administrators have the option to
delete files. In this context the 'Release' column would be redundant
diff --git a/lib/lp/registry/stories/project/xx-project-edit.txt b/lib/lp/registry/stories/project/xx-project-edit.txt
index f677c6e..ad2a45c 100644
--- a/lib/lp/registry/stories/project/xx-project-edit.txt
+++ b/lib/lp/registry/stories/project/xx-project-edit.txt
@@ -145,10 +145,12 @@ there are fewer fields available.
Traceback (most recent call last):
...
LookupError: label 'Maintainer'
+ ...
>>> expert_browser.getControl('Registrant')
Traceback (most recent call last):
...
LookupError: label 'Registrant'
+ ...
>>> expert_browser.getControl('Name').value = 'newer-name'
>>> expert_browser.getControl('Aliases').value = 'sleepy'
diff --git a/lib/lp/registry/stories/team-polls/vote-poll.txt b/lib/lp/registry/stories/team-polls/vote-poll.txt
index 31b3803..603561d 100644
--- a/lib/lp/registry/stories/team-polls/vote-poll.txt
+++ b/lib/lp/registry/stories/team-polls/vote-poll.txt
@@ -143,6 +143,7 @@ It's not possible to vote on closed polls, even if we manually craft the URL.
Traceback (most recent call last):
...
LookupError: name 'continue'
+ ...
The same is true for condorcet polls too.
@@ -159,6 +160,7 @@ The same is true for condorcet polls too.
Traceback (most recent call last):
...
LookupError: name 'continue'
+ ...
>>> team_admin_browser.open(
... 'http://launchpad.test/~ubuntu-team/+poll/director-2004/+vote')
diff --git a/lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt b/lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt
index 34b9c22..c7113c5 100644
--- a/lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt
+++ b/lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt
@@ -41,6 +41,7 @@ membership can't be renewed and explain why.
Traceback (most recent call last):
...
LookupError: label 'Renew'
+ ...
>>> print extract_text(find_tag_by_id(browser.contents, 'maincontent'))
Renew membership of Karl Tilbury in Mirror Administrators
This membership cannot be renewed because Mirror Administrators
@@ -70,6 +71,7 @@ the user to renew that membership because it's not about to expire.
Traceback (most recent call last):
...
LookupError: label 'Renew'
+ ...
>>> print extract_text(find_tag_by_id(browser.contents, 'maincontent'))
Renew membership of Karl Tilbury in Mirror Administrators
This membership cannot be renewed because it is not set to expire in
@@ -126,6 +128,7 @@ Karl can't renew it again, since it's now not set to expire soon.
Traceback (most recent call last):
...
LookupError: label 'Renew'
+ ...
>>> print extract_text(find_tag_by_id(browser.contents, 'maincontent'))
Renew membership of Karl Tilbury in Mirror Administrators
This membership cannot be renewed because it is not set to expire in
diff --git a/lib/lp/services/profile/profiling.txt b/lib/lp/services/profile/profiling.txt
index 86876f0..208fd1f 100644
--- a/lib/lp/services/profile/profiling.txt
+++ b/lib/lp/services/profile/profiling.txt
@@ -55,7 +55,7 @@ that takes care of profiling (among other things).
Requests made with a testbrowser will also be profiled.
- >>> from zope.testbrowser.testing import Browser
+ >>> from zope.app.testing.testbrowser import Browser
>>> browser = Browser()
>>> browser.open('http://launchpad.test/')
>>> len(PageTestLayer.profiler.getstats()) > profile_count
diff --git a/lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled b/lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled
index 916dc59..e6647cf 100644
--- a/lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled
+++ b/lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled
@@ -17,7 +17,7 @@ First we create a view that will provoke a TimeoutError, a view for the
exception, and a time machine.
>>> from zope.publisher.browser import BrowserView
- >>> from zope.testbrowser.testing import Browser
+ >>> from zope.app.testing.testbrowser import Browser
>>> from textwrap import dedent
>>> from zope.publisher.interfaces.browser import (
... IBrowserRequest, IBrowserView, IBrowserPublisher)
diff --git a/lib/lp/services/webapp/tests/test_login.py b/lib/lp/services/webapp/tests/test_login.py
index 1a7dfad..2ae9c2e 100644
--- a/lib/lp/services/webapp/tests/test_login.py
+++ b/lib/lp/services/webapp/tests/test_login.py
@@ -39,11 +39,11 @@ from testtools.matchers import (
Equals,
MatchesListwise,
)
+from zope.app.testing.testbrowser import Browser as TestBrowser
from zope.component import getUtility
from zope.security.management import newInteraction
from zope.security.proxy import removeSecurityProxy
from zope.session.interfaces import ISession
-from zope.testbrowser.testing import Browser as TestBrowser
from lp.registry.interfaces.person import IPerson
from lp.services.database.interfaces import (
diff --git a/lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt b/lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt
index 774408d..f22cd6b 100644
--- a/lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt
+++ b/lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt
@@ -270,6 +270,7 @@ Similarly to users, teams with active PPAs cannot be renamed either.
Traceback (most recent call last):
...
LookupError: name u'field.name'
+ ...
>>> print(extract_text(
... first_tag_by_class(sample_browser.contents, 'form')))
@@ -557,6 +558,7 @@ all their PPAs.
Traceback (most recent call last):
...
LookupError: name u'field.accepted'
+ ...
>>> print(extract_text(
... first_tag_by_class(cprov_browser.contents, 'form')))
diff --git a/lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt b/lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
index 93ad606..6b1a2a2 100644
--- a/lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
+++ b/lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
@@ -106,6 +106,7 @@ The 'search' form is also suppresed.
Traceback (most recent call last):
...
LookupError: label u'Search'
+ ...
== Searching PPAs ==
diff --git a/lib/lp/testing/browser.py b/lib/lp/testing/browser.py
index d749607..e858d95 100644
--- a/lib/lp/testing/browser.py
+++ b/lib/lp/testing/browser.py
@@ -8,7 +8,7 @@ is used in tests which utilize the AppServerLayer to run the app server in a
child process. The Zope testing browser fakes its connections in-process, so
that's not good enough.
-The browser provided here extends `zope.testbrowser.testing.Browser` by
+The browser provided here extends `zope.app.testing.testbrowser.Browser` by
providing a close() method that delegates to the underlying mechanize browser,
and it tracks all Browser instances to ensure that they are closed. This
latter prevents open socket leaks even when the doctest doesn't explicitly
diff --git a/lib/lp/testing/layers.py b/lib/lp/testing/layers.py
index 0f00f62..3ec422f 100644
--- a/lib/lp/testing/layers.py
+++ b/lib/lp/testing/layers.py
@@ -1021,8 +1021,8 @@ def wsgi_application(environ, start_response):
request, handle_errors=handle_errors)
response = request.response
# We sort these, and then put the status first, because
- # zope.testbrowser.testing does--and because it makes it easier to write
- # reliable tests.
+ # zope.app.testing.testbrowser does--and because it makes it easier to
+ # write reliable tests.
headers = sorted(response.getHeaders())
status = response.getStatusString()
headers.insert(0, ('Status', status))
diff --git a/lib/lp/testing/pages.py b/lib/lp/testing/pages.py
index 9e1b0c3..e7c2fc3 100644
--- a/lib/lp/testing/pages.py
+++ b/lib/lp/testing/pages.py
@@ -49,11 +49,11 @@ from zope.app.testing.functional import (
HTTPCaller,
SimpleCookie,
)
+from zope.app.testing.testbrowser import Browser
from zope.component import getUtility
from zope.security.management import setSecurityPolicy
from zope.security.proxy import removeSecurityProxy
from zope.session.interfaces import ISession
-from zope.testbrowser.testing import Browser
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.registry.errors import NameAlreadyTaken
diff --git a/lib/lp/testopenid/testing/helpers.py b/lib/lp/testopenid/testing/helpers.py
index 9f9abd5..bed30cb 100644
--- a/lib/lp/testopenid/testing/helpers.py
+++ b/lib/lp/testopenid/testing/helpers.py
@@ -21,7 +21,7 @@ from openid.consumer.discover import (
OPENID_IDP_2_0_TYPE,
OpenIDServiceEndpoint,
)
-from zope.testbrowser.testing import PublisherConnection
+from zope.app.testing.testbrowser import PublisherConnection
from lp.services.webapp import LaunchpadView
from lp.testopenid.interfaces.server import get_server_url
diff --git a/setup.py b/setup.py
index e1b28e3..a8a06bd 100644
--- a/setup.py
+++ b/setup.py
@@ -270,7 +270,7 @@ setup(
'zope.session',
'zope.tal',
'zope.tales',
- 'zope.testbrowser',
+ 'zope.testbrowser[wsgi]',
'zope.testing',
'zope.testrunner[subunit]',
'zope.traversing',