~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/doc/bug.txt

  • Committer: Curtis Hovey
  • Date: 2011-12-24 17:49:30 UTC
  • mto: This revision was merged to the branch mainline in revision 14602.
  • Revision ID: curtis.hovey@canonical.com-20111224174930-xk1d5cvhyxq46ctf
Moved webapp to lp.services.

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
 
164
164
It is guaranteed to implement the correct interface, too:
165
165
 
166
 
    >>> from canonical.launchpad.webapp.testing import verifyObject
 
166
    >>> from lp.services.webapp.testing import verifyObject
167
167
    >>> verifyObject(IBug, firefox_crashes)
168
168
    True
169
169
 
177
177
To search for bugs matching specific criteria, use IBugSet.searchAsUser:
178
178
 
179
179
    >>> from canonical.database.sqlbase import flush_database_updates
180
 
    >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
 
180
    >>> from lp.services.webapp.interfaces import ILaunchBag
181
181
 
182
182
    >>> def current_user():
183
183
    ...     return getUtility(ILaunchBag).user
215
215
For things like bug notification emails, it's handy to be able to
216
216
include a URL to the bug inside the email.
217
217
 
218
 
    >>> from canonical.launchpad.webapp import canonical_url
 
218
    >>> from lp.services.webapp import canonical_url
219
219
    >>> print canonical_url(firefox_crashes)
220
220
    http://.../bugs/6
221
221