want a way to make a TestBrowser logged in as a particular user
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
I'd like to use a TestBrowser to examine what happens when I'm logged in as a member of ~admins. According to lifeless, there is no builtin way to do this: you would think you could call BrowserTestCase
At the moment in lp:~mbp/launchpad/flags-gui I have this:
def getFeaturePageB
root = getUtility(
url = canonical_url(root, view_name=
# XXX: To make a UserBrowser, you must know the password. This should
# be separated out into test infrastructure -- mbp 20100923.
user = self.factory.
admin_team = getUtility(
with person_
return self.getUserBro
Perhaps there's a builtin way to do it or perhaps this can be lifted into somewhere else.
I don't know of a built-in way to do this.
When we rip out passwords from the DB, this should be done as a side-effect (see bug 629167 / step 2 of https:/ /dev.launchpad. net/LEP/ OpenIdRoadmap). I could mark this as a dupe of that bug, but I'll just point the two at each other instead.