equal
deleted
inserted
replaced
|
1 """only for unit tests !""" |
|
2 |
|
3 from cubicweb.common.view import EntityView |
|
4 |
|
5 HTML_PAGE = u"""<html> |
|
6 <body> |
|
7 <h1>Hello World !</h1> |
|
8 </body> |
|
9 </html> |
|
10 """ |
|
11 |
|
12 class SimpleView(EntityView): |
|
13 id = 'simple' |
|
14 accepts = ('Bug',) |
|
15 |
|
16 def call(self, **kwargs): |
|
17 self.cell_call(0, 0) |
|
18 |
|
19 def cell_call(self, row, col): |
|
20 self.w(HTML_PAGE) |
|
21 |
|
22 class RaisingView(EntityView): |
|
23 id = 'raising' |
|
24 accepts = ('Bug',) |
|
25 |
|
26 def cell_call(self, row, col): |
|
27 raise ValueError() |