=== modified file 'lib/canonical/launchpad/pagetests/REFERENCE.txt'
--- lib/canonical/launchpad/pagetests/REFERENCE.txt 2008-09-23 13:02:41 +0000
+++ lib/canonical/launchpad/pagetests/REFERENCE.txt 2010-11-30 15:31:40 +0000
@@ -1,4 +1,5 @@
-= Kiko's wonderfully incomplete testbrowser reference manual for dummies =
+Kiko's wonderfully incomplete testbrowser reference manual for dummies
+======================================================================
Opening pages:
@@ -31,7 +32,8 @@
True
-== Debugging ==
+Debugging
+---------
If you need to debug a pagetest, you can use the convenient 'stop()' method
exported into pagetest globals. This is essentially the same as importing pdb
@@ -49,7 +51,8 @@
appserver will be unhappy.
-== Parsing content ==
+Parsing content
+---------------
Parsing specific sections of pages:
@@ -73,7 +76,7 @@
>>> print extract_text(html_string, extract_image_text=True)
Here's some text with an image.
- >>> html_string = ""
+ >>> html_string = """"""
>>> print extract_text(html_string, extract_image_text=True)
Alt text works too.
@@ -110,21 +113,22 @@
Using BeautifulSoup in all its glory:
- >>> from BeautifulSoup import BeautifulSoup, SoupStrainer
- >>> anon_browser.open("http://launchpad.dev/~name16")
- >>> strainer = SoupStrainer(['link'], {'type': ['application/rdf+xml']})
- >>> soup = BeautifulSoup(anon_browser.contents, parseOnlyThese=strainer)
- >>> print soup.renderContents()
-
-
- >>> strainer = SoupStrainer({'class': ['error']})
- >>> soup = BeautifulSoup(anon_browser.contents, parseOnlyThese=strainer)
- >>> for tag in soup:
- ... print extract_text(tag)
- Quantities must be greater than or equal 0.
-
-
-== Links ==
+ >>> from BeautifulSoup import BeautifulSoup, SoupStrainer
+ >>> anon_browser.open("http://launchpad.dev/~name16")
+ >>> strainer = SoupStrainer(['link'], {'type': ['application/rdf+xml']})
+ >>> soup = BeautifulSoup(anon_browser.contents, parseOnlyThese=strainer)
+ >>> print soup.renderContents()
+
+
+ >>> strainer = SoupStrainer({'class': ['error']})
+ >>> soup = BeautifulSoup(anon_browser.contents, parseOnlyThese=strainer)
+ >>> for tag in soup:
+ ... print extract_text(tag)
+ Quantities must be greater than or equal 0.
+
+
+Links
+-----
Manipulating links:
@@ -163,7 +167,8 @@
u'http://launchpad.dev/foo'
-== Form Controls ==
+Form Controls
+-------------
Basics:
@@ -202,7 +207,8 @@
'http://where-you-went-after-posting/'
-== Committing transactions ==
+Committing transactions
+-----------------------
The transaction module is already imported into your pagetest's globals, so
just do:
@@ -213,24 +219,24 @@
You do not need to be logged in to do this.
-== Gotchas ==
+Gotchas
+-------
If you get:
- AttributeError: 'zope.thread.local' object has no attribute 'interaction'
+ AttributeError: 'thread._local' object has no attribute 'interaction'
This means you are trying to getUtility() and aren't logged in.
Use something like this:
-If you get:
-
>>> from canonical.launchpad.ftests import ANONYMOUS, login, logout
>>> login(ANONYMOUS)
+If you get:
+
AssertionError: newInteraction called while another interaction is
active.
This means you forgot to log out:
- >>> logout()
-
+ >>> logout()
=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml 2010-11-22 23:08:45 +0000
+++ lib/lp/registry/browser/configure.zcml 2010-11-30 15:31:40 +0000
@@ -1607,10 +1607,6 @@
-
-