devtools/testlib.py
branchstable
changeset 8628 b236b91836c0
parent 8497 7f71e366cb5e
child 8645 310040c668c0
child 8652 7812093e21f7
equal deleted inserted replaced
8619:366c8acd0cc8 8628:b236b91836c0
   813         and parsed.
   813         and parsed.
   814 
   814 
   815         :returns: an instance of `cubicweb.devtools.htmlparser.PageInfo`
   815         :returns: an instance of `cubicweb.devtools.htmlparser.PageInfo`
   816                   encapsulation the generated HTML
   816                   encapsulation the generated HTML
   817         """
   817         """
   818         req = req or rset and rset.req or self.request()
   818         if req is None:
       
   819             if rset is None:
       
   820                 req = self.request()
       
   821             else:
       
   822                 req = rset.req
   819         req.form['vid'] = vid
   823         req.form['vid'] = vid
   820         viewsreg = self.vreg['views']
   824         viewsreg = self.vreg['views']
   821         view = viewsreg.select(vid, req, rset=rset, **kwargs)
   825         view = viewsreg.select(vid, req, rset=rset, **kwargs)
   822         # set explicit test description
   826         # set explicit test description
   823         if rset is not None:
   827         if rset is not None: