Show
Ignore:
Timestamp:
03/09/09 13:02:54 (12 months ago)
Author:
JensDiemer
Message:

unittests: strip whitspace in link test.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid_project/tests/__init__.py

    r1749 r1840  
    8181    Last commit info: 
    8282    ~~~~~~~~~~~~~~~~~ 
    83     $LastChangedDate: $ 
    84     $Rev: $ 
    85     $Author: $ 
     83    $LastChangedDate$ 
     84    $Rev$ 
     85    $Author$ 
    8686 
    8787    :copyleft: 2007-2008 by the PyLucid team, see AUTHORS for more details. 
     
    267267 
    268268    # 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) 
    270270 
    271271    def assertResponse(self, response, must_contain=(), must_not_contain=()): 
     
    412412        Return all links found with the HREF_RE. 
    413413        """ 
    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 
    415417 
    416418    # _________________________________________________________________________