# HG changeset patch # User Sylvain Thénault # Date 1265367865 -3600 # Node ID 34f57659f90ea1cf1f1f53fd413e4bf6369394ab # Parent 310b5f01c98216dd8d7c845fc83f99da540a036a no needs for a views package, 3.6 api update diff -r 310b5f01c982 -r 34f57659f90e devtools/test/data/views.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/devtools/test/data/views.py Fri Feb 05 12:04:25 2010 +0100 @@ -0,0 +1,34 @@ +"""only for unit tests ! + +:organization: Logilab +:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. +:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr +:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses +""" + +from cubicweb.view import EntityView +from cubicweb.selectors import implements + +HTML_PAGE = u""" + +

Hello World !

+ + +""" + +class SimpleView(EntityView): + __regid__ = 'simple' + __select__ = implements('Bug',) + + def call(self, **kwargs): + self.cell_call(0, 0) + + def cell_call(self, row, col): + self.w(HTML_PAGE) + +class RaisingView(EntityView): + __regid__ = 'raising' + __select__ = implements('Bug',) + + def cell_call(self, row, col): + raise ValueError() diff -r 310b5f01c982 -r 34f57659f90e devtools/test/data/views/__init__.py diff -r 310b5f01c982 -r 34f57659f90e devtools/test/data/views/bug.py --- a/devtools/test/data/views/bug.py Fri Feb 05 11:58:11 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -"""only for unit tests ! - -:organization: Logilab -:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. -:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr -:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses -""" - -from cubicweb.view import EntityView -from cubicweb.selectors import implements - -HTML_PAGE = u""" - -

Hello World !

- - -""" - -class SimpleView(EntityView): - id = 'simple' - __select__ = implements('Bug',) - - def call(self, **kwargs): - self.cell_call(0, 0) - - def cell_call(self, row, col): - self.w(HTML_PAGE) - -class RaisingView(EntityView): - id = 'raising' - __select__ = implements('Bug',) - - def cell_call(self, row, col): - raise ValueError()