[test] fix req default value handling in CubicWebTC.view (closes #2544376)
It's no more than the standard ``if rset`` vs. ``if rset is None`` error.
--- a/devtools/testlib.py Wed Dec 12 22:13:38 2012 +0100
+++ b/devtools/testlib.py Thu Dec 20 12:14:14 2012 +0100
@@ -815,7 +815,11 @@
:returns: an instance of `cubicweb.devtools.htmlparser.PageInfo`
encapsulation the generated HTML
"""
- req = req or rset and rset.req or self.request()
+ if req is None:
+ if rset is None:
+ req = self.request()
+ else:
+ req = rset.req
req.form['vid'] = vid
viewsreg = self.vreg['views']
view = viewsreg.select(vid, req, rset=rset, **kwargs)