Changeset 1840 for trunk/pylucid_project/tests
- Timestamp:
- 03/09/09 13:02:54 (12 months ago)
- Files:
-
- 1 modified
-
trunk/pylucid_project/tests/__init__.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid_project/tests/__init__.py
r1749 r1840 81 81 Last commit info: 82 82 ~~~~~~~~~~~~~~~~~ 83 $LastChangedDate :$84 $Rev :$85 $Author :$83 $LastChangedDate$ 84 $Rev$ 85 $Author$ 86 86 87 87 :copyleft: 2007-2008 by the PyLucid team, see AUTHORS for more details. … … 267 267 268 268 # A simple regex to get all html links out of a page content 269 HREF_RE = re.compile('<a href="(.+?)".*?>(.+?)</a>' )269 HREF_RE = re.compile('<a href="(.+?)".*?>(.+?)</a>', re.MULTILINE | re.DOTALL) 270 270 271 271 def assertResponse(self, response, must_contain=(), must_not_contain=()): … … 412 412 Return all links found with the HREF_RE. 413 413 """ 414 return self.HREF_RE.findall(content) 414 links = self.HREF_RE.findall(content) 415 links = [(i[0], i[1].strip()) for i in links] 416 return links 415 417 416 418 # _________________________________________________________________________