author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Sat, 06 Feb 2010 10:34:35 +0100 | |
branch | stable |
changeset 4486 | 9a4ef69bdef7 |
parent 4212 | ab6573088b4a |
child 4252 | 6c4f109c2b03 |
permissions | -rw-r--r-- |
0 | 1 |
"""this module contains base classes for web tests |
2 |
||
3 |
:organization: Logilab |
|
4212
ab6573088b4a
update copyright: welcome 2010
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
3956
diff
changeset
|
4 |
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
0 | 5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1775
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
0 | 7 |
""" |
8 |
__docformat__ = "restructuredtext en" |
|
9 |
||
10 |
import sys |
|
11 |
from math import log |
|
12 |
||
13 |
from logilab.common.debugger import Debugger |
|
14 |
from logilab.common.testlib import InnerTest |
|
15 |
from logilab.common.pytest import nocoverage |
|
16 |
||
3913
60f31797e01e
ignore validation error during auto-population of a test db
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3764
diff
changeset
|
17 |
from cubicweb import ValidationError |
0 | 18 |
from cubicweb.devtools import VIEW_VALIDATORS |
19 |
from cubicweb.devtools.apptest import EnvBasedTC |
|
20 |
from cubicweb.devtools._apptest import unprotected_entities, SYSTEM_RELATIONS |
|
21 |
from cubicweb.devtools.htmlparser import DTDValidator, SaxOnlyValidator, HTMLValidator |
|
22 |
from cubicweb.devtools.fill import insert_entity_queries, make_relations_queries |
|
23 |
||
24 |
from cubicweb.sobjects.notification import NotificationView |
|
25 |
||
26 |
from cubicweb.vregistry import NoSelectableObject |
|
27 |
||
28 |
||
29 |
## TODO ############### |
|
30 |
# creation tests: make sure an entity was actually created |
|
31 |
# Existing Test Environment |
|
32 |
||
33 |
class CubicWebDebugger(Debugger): |
|
34 |
||
35 |
def do_view(self, arg): |
|
36 |
import webbrowser |
|
37 |
data = self._getval(arg) |
|
38 |
file('/tmp/toto.html', 'w').write(data) |
|
39 |
webbrowser.open('file:///tmp/toto.html') |
|
40 |
||
41 |
def how_many_dict(schema, cursor, how_many, skip): |
|
42 |
"""compute how many entities by type we need to be able to satisfy relations |
|
43 |
cardinality |
|
44 |
""" |
|
45 |
# compute how many entities by type we need to be able to satisfy relation constraint |
|
46 |
relmap = {} |
|
47 |
for rschema in schema.relations(): |
|
3689
deb13e88e037
follow yams 0.25 api changes to improve performance
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3226
diff
changeset
|
48 |
if rschema.final: |
0 | 49 |
continue |
50 |
for subj, obj in rschema.iter_rdefs(): |
|
51 |
card = rschema.rproperty(subj, obj, 'cardinality') |
|
52 |
if card[0] in '1?' and len(rschema.subjects(obj)) == 1: |
|
53 |
relmap.setdefault((rschema, subj), []).append(str(obj)) |
|
54 |
if card[1] in '1?' and len(rschema.objects(subj)) == 1: |
|
55 |
relmap.setdefault((rschema, obj), []).append(str(subj)) |
|
56 |
unprotected = unprotected_entities(schema) |
|
57 |
for etype in skip: |
|
58 |
unprotected.add(etype) |
|
59 |
howmanydict = {} |
|
60 |
for etype in unprotected_entities(schema, strict=True): |
|
61 |
howmanydict[str(etype)] = cursor.execute('Any COUNT(X) WHERE X is %s' % etype)[0][0] |
|
62 |
if etype in unprotected: |
|
63 |
howmanydict[str(etype)] += how_many |
|
64 |
for (rschema, etype), targets in relmap.iteritems(): |
|
65 |
# XXX should 1. check no cycle 2. propagate changes |
|
66 |
relfactor = sum(howmanydict[e] for e in targets) |
|
67 |
howmanydict[str(etype)] = max(relfactor, howmanydict[etype]) |
|
68 |
return howmanydict |
|
69 |
||
70 |
||
71 |
def line_context_filter(line_no, center, before=3, after=None): |
|
72 |
"""return true if line are in context |
|
73 |
if after is None: after = before""" |
|
74 |
if after is None: |
|
75 |
after = before |
|
76 |
return center - before <= line_no <= center + after |
|
77 |
||
78 |
## base webtest class ######################################################### |
|
563
a690996639ca
[testlib] fix pb. related to class scoped variables
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
562
diff
changeset
|
79 |
VALMAP = {None: None, 'dtd': DTDValidator, 'xml': SaxOnlyValidator} |
a690996639ca
[testlib] fix pb. related to class scoped variables
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
562
diff
changeset
|
80 |
|
0 | 81 |
class WebTest(EnvBasedTC): |
82 |
"""base class for web tests""" |
|
83 |
__abstract__ = True |
|
84 |
||
85 |
pdbclass = CubicWebDebugger |
|
86 |
# this is a hook to be able to define a list of rql queries |
|
87 |
# that are application dependent and cannot be guessed automatically |
|
88 |
application_rql = [] |
|
89 |
||
90 |
# validators are used to validate (XML, DTD, whatever) view's content |
|
91 |
# validators availables are : |
|
92 |
# DTDValidator : validates XML + declared DTD |
|
93 |
# SaxOnlyValidator : guarantees XML is well formed |
|
94 |
# None : do not try to validate anything |
|
95 |
# validators used must be imported from from.devtools.htmlparser |
|
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
96 |
content_type_validators = { |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
97 |
# maps MIME type : validator name |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
98 |
# |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
99 |
# do not set html validators here, we need HTMLValidator for html |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
100 |
# snippets |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
101 |
#'text/html': DTDValidator, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
102 |
#'application/xhtml+xml': DTDValidator, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
103 |
'application/xml': SaxOnlyValidator, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
104 |
'text/xml': SaxOnlyValidator, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
105 |
'text/plain': None, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
106 |
'text/comma-separated-values': None, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
107 |
'text/x-vcard': None, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
108 |
'text/calendar': None, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
109 |
'application/json': None, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
110 |
'image/png': None, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
111 |
} |
562
bdadb26c4a3c
old .validators attribute is now .vid_validators
sylvain.thenault@logilab.fr
parents:
549
diff
changeset
|
112 |
# maps vid : validator name (override content_type_validators) |
563
a690996639ca
[testlib] fix pb. related to class scoped variables
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
562
diff
changeset
|
113 |
vid_validators = dict((vid, VALMAP[valkey]) |
562
bdadb26c4a3c
old .validators attribute is now .vid_validators
sylvain.thenault@logilab.fr
parents:
549
diff
changeset
|
114 |
for vid, valkey in VIEW_VALIDATORS.iteritems()) |
1605 | 115 |
|
0 | 116 |
no_auto_populate = () |
1605 | 117 |
ignored_relations = () |
118 |
||
0 | 119 |
def custom_populate(self, how_many, cursor): |
120 |
pass |
|
1605 | 121 |
|
0 | 122 |
def post_populate(self, cursor): |
123 |
pass |
|
1605 | 124 |
|
0 | 125 |
@nocoverage |
126 |
def auto_populate(self, how_many): |
|
127 |
"""this method populates the database with `how_many` entities |
|
128 |
of each possible type. It also inserts random relations between them |
|
129 |
""" |
|
130 |
cu = self.cursor() |
|
131 |
self.custom_populate(how_many, cu) |
|
132 |
vreg = self.vreg |
|
133 |
howmanydict = how_many_dict(self.schema, cu, how_many, self.no_auto_populate) |
|
134 |
for etype in unprotected_entities(self.schema): |
|
135 |
if etype in self.no_auto_populate: |
|
136 |
continue |
|
137 |
nb = howmanydict.get(etype, how_many) |
|
138 |
for rql, args in insert_entity_queries(etype, self.schema, vreg, nb): |
|
139 |
cu.execute(rql, args) |
|
140 |
edict = {} |
|
141 |
for etype in unprotected_entities(self.schema, strict=True): |
|
142 |
rset = cu.execute('%s X' % etype) |
|
143 |
edict[str(etype)] = set(row[0] for row in rset.rows) |
|
144 |
existingrels = {} |
|
145 |
ignored_relations = SYSTEM_RELATIONS + self.ignored_relations |
|
146 |
for rschema in self.schema.relations(): |
|
3689
deb13e88e037
follow yams 0.25 api changes to improve performance
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3226
diff
changeset
|
147 |
if rschema.final or rschema in ignored_relations: |
0 | 148 |
continue |
149 |
rset = cu.execute('DISTINCT Any X,Y WHERE X %s Y' % rschema) |
|
1132 | 150 |
existingrels.setdefault(rschema.type, set()).update((x, y) for x, y in rset) |
0 | 151 |
q = make_relations_queries(self.schema, edict, cu, ignored_relations, |
152 |
existingrels=existingrels) |
|
153 |
for rql, args in q: |
|
3913
60f31797e01e
ignore validation error during auto-population of a test db
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3764
diff
changeset
|
154 |
try: |
60f31797e01e
ignore validation error during auto-population of a test db
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3764
diff
changeset
|
155 |
cu.execute(rql, args) |
60f31797e01e
ignore validation error during auto-population of a test db
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3764
diff
changeset
|
156 |
except ValidationError, ex: |
60f31797e01e
ignore validation error during auto-population of a test db
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3764
diff
changeset
|
157 |
# failed to satisfy some constraint |
60f31797e01e
ignore validation error during auto-population of a test db
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3764
diff
changeset
|
158 |
print 'error in automatic db population', ex |
0 | 159 |
self.post_populate(cu) |
160 |
self.commit() |
|
161 |
||
162 |
@nocoverage |
|
823
cb8ccbef8fa5
main template refactoring
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
563
diff
changeset
|
163 |
def _check_html(self, output, view, template='main-template'): |
0 | 164 |
"""raises an exception if the HTML is invalid""" |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
165 |
try: |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
166 |
validatorclass = self.vid_validators[view.id] |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
167 |
except KeyError: |
3956
5d1b8fc9cb98
don't use html/dtd validator as default validator for non html views. Closes #550162
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3913
diff
changeset
|
168 |
if view.content_type in ('text/html', 'application/xhtml+xml'): |
5d1b8fc9cb98
don't use html/dtd validator as default validator for non html views. Closes #550162
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3913
diff
changeset
|
169 |
if template is None: |
5d1b8fc9cb98
don't use html/dtd validator as default validator for non html views. Closes #550162
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3913
diff
changeset
|
170 |
default_validator = HTMLValidator |
5d1b8fc9cb98
don't use html/dtd validator as default validator for non html views. Closes #550162
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3913
diff
changeset
|
171 |
else: |
5d1b8fc9cb98
don't use html/dtd validator as default validator for non html views. Closes #550162
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3913
diff
changeset
|
172 |
default_validator = DTDValidator |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
173 |
else: |
3956
5d1b8fc9cb98
don't use html/dtd validator as default validator for non html views. Closes #550162
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3913
diff
changeset
|
174 |
default_validator = None |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
175 |
validatorclass = self.content_type_validators.get(view.content_type, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
176 |
default_validator) |
0 | 177 |
if validatorclass is None: |
178 |
return None |
|
179 |
validator = validatorclass() |
|
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
180 |
return validator.parse_string(output.strip()) |
0 | 181 |
|
182 |
||
2058
7ef12c03447c
nicer vreg api, try to make rset an optional named argument in select and derivated (including selectors)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
183 |
def view(self, vid, rset=None, req=None, template='main-template', |
7ef12c03447c
nicer vreg api, try to make rset an optional named argument in select and derivated (including selectors)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
184 |
**kwargs): |
0 | 185 |
"""This method tests the view `vid` on `rset` using `template` |
186 |
||
187 |
If no error occured while rendering the view, the HTML is analyzed |
|
188 |
and parsed. |
|
189 |
||
190 |
:returns: an instance of `cubicweb.devtools.htmlparser.PageInfo` |
|
191 |
encapsulation the generated HTML |
|
192 |
""" |
|
1142 | 193 |
req = req or rset and rset.req or self.request() |
0 | 194 |
req.form['vid'] = vid |
2058
7ef12c03447c
nicer vreg api, try to make rset an optional named argument in select and derivated (including selectors)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
195 |
kwargs['rset'] = rset |
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
196 |
viewsreg = self.vreg['views'] |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
197 |
view = viewsreg.select(vid, req, **kwargs) |
0 | 198 |
# set explicit test description |
199 |
if rset is not None: |
|
2070 | 200 |
self.set_description("testing %s, mod=%s (%s)" % ( |
201 |
vid, view.__module__, rset.printable_rql())) |
|
0 | 202 |
else: |
2070 | 203 |
self.set_description("testing %s, mod=%s (no rset)" % ( |
204 |
vid, view.__module__)) |
|
0 | 205 |
if template is None: # raw view testing, no template |
1773 | 206 |
viewfunc = view.render |
829
ea092805d8f8
The main template is now a simple view, there's no need to monkey patch TheMainTemplate._select_view_and_rset
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
823
diff
changeset
|
207 |
else: |
ea092805d8f8
The main template is now a simple view, there's no need to monkey patch TheMainTemplate._select_view_and_rset
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
823
diff
changeset
|
208 |
kwargs['view'] = view |
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
209 |
templateview = viewsreg.select(template, req, **kwargs) |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
210 |
viewfunc = lambda **k: viewsreg.main_template(req, template, |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
211 |
**kwargs) |
2058
7ef12c03447c
nicer vreg api, try to make rset an optional named argument in select and derivated (including selectors)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
212 |
kwargs.pop('rset') |
829
ea092805d8f8
The main template is now a simple view, there's no need to monkey patch TheMainTemplate._select_view_and_rset
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
823
diff
changeset
|
213 |
return self._test_view(viewfunc, view, template, kwargs) |
0 | 214 |
|
215 |
||
829
ea092805d8f8
The main template is now a simple view, there's no need to monkey patch TheMainTemplate._select_view_and_rset
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
823
diff
changeset
|
216 |
def _test_view(self, viewfunc, view, template='main-template', kwargs={}): |
0 | 217 |
"""this method does the actual call to the view |
218 |
||
219 |
If no error occured while rendering the view, the HTML is analyzed |
|
220 |
and parsed. |
|
221 |
||
222 |
:returns: an instance of `cubicweb.devtools.htmlparser.PageInfo` |
|
223 |
encapsulation the generated HTML |
|
224 |
""" |
|
225 |
output = None |
|
226 |
try: |
|
227 |
output = viewfunc(**kwargs) |
|
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
228 |
return self._check_html(output, view, template) |
0 | 229 |
except (SystemExit, KeyboardInterrupt): |
230 |
raise |
|
231 |
except: |
|
232 |
# hijack exception: generative tests stop when the exception |
|
233 |
# is not an AssertionError |
|
234 |
klass, exc, tcbk = sys.exc_info() |
|
235 |
try: |
|
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
236 |
msg = '[%s in %s] %s' % (klass, view.id, exc) |
0 | 237 |
except: |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
238 |
msg = '[%s in %s] undisplayable exception' % (klass, view.id) |
0 | 239 |
if output is not None: |
240 |
position = getattr(exc, "position", (0,))[0] |
|
241 |
if position: |
|
242 |
# define filter |
|
243 |
output = output.splitlines() |
|
244 |
width = int(log(len(output), 10)) + 1 |
|
245 |
line_template = " %" + ("%i" % width) + "i: %s" |
|
246 |
# XXX no need to iterate the whole file except to get |
|
247 |
# the line number |
|
248 |
output = '\n'.join(line_template % (idx + 1, line) |
|
249 |
for idx, line in enumerate(output) |
|
250 |
if line_context_filter(idx+1, position)) |
|
1133 | 251 |
msg += '\nfor output:\n%s' % output |
0 | 252 |
raise AssertionError, msg, tcbk |
253 |
||
427
e894eec21a1b
move selection of entity types to test in a method to ease overriding
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
254 |
|
e894eec21a1b
move selection of entity types to test in a method to ease overriding
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
255 |
def to_test_etypes(self): |
e894eec21a1b
move selection of entity types to test in a method to ease overriding
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
256 |
return unprotected_entities(self.schema, strict=True) |
1605 | 257 |
|
1004
625e59773119
fix automatic test: ensure we actually have
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
563
diff
changeset
|
258 |
def iter_automatic_rsets(self, limit=10): |
0 | 259 |
"""generates basic resultsets for each entity type""" |
427
e894eec21a1b
move selection of entity types to test in a method to ease overriding
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
260 |
etypes = self.to_test_etypes() |
2219
bb5098e74b82
protect against empty etypes
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2070
diff
changeset
|
261 |
if not etypes: |
bb5098e74b82
protect against empty etypes
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2070
diff
changeset
|
262 |
return |
0 | 263 |
for etype in etypes: |
1004
625e59773119
fix automatic test: ensure we actually have
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
563
diff
changeset
|
264 |
yield self.execute('Any X LIMIT %s WHERE X is %s' % (limit, etype)) |
0 | 265 |
etype1 = etypes.pop() |
1775
f450f1594992
fix in case only one type is tested
sylvain.thenault@logilab.fr
parents:
1773
diff
changeset
|
266 |
try: |
f450f1594992
fix in case only one type is tested
sylvain.thenault@logilab.fr
parents:
1773
diff
changeset
|
267 |
etype2 = etypes.pop() |
f450f1594992
fix in case only one type is tested
sylvain.thenault@logilab.fr
parents:
1773
diff
changeset
|
268 |
except KeyError: |
f450f1594992
fix in case only one type is tested
sylvain.thenault@logilab.fr
parents:
1773
diff
changeset
|
269 |
etype2 = etype1 |
0 | 270 |
# test a mixed query (DISTINCT/GROUP to avoid getting duplicate |
271 |
# X which make muledit view failing for instance (html validation fails |
|
272 |
# because of some duplicate "id" attributes) |
|
273 |
yield self.execute('DISTINCT Any X, MAX(Y) GROUPBY X WHERE X is %s, Y is %s' % (etype1, etype2)) |
|
274 |
# test some application-specific queries if defined |
|
275 |
for rql in self.application_rql: |
|
276 |
yield self.execute(rql) |
|
277 |
||
1605 | 278 |
|
0 | 279 |
def list_views_for(self, rset): |
280 |
"""returns the list of views that can be applied on `rset`""" |
|
281 |
req = rset.req |
|
282 |
only_once_vids = ('primary', 'secondary', 'text') |
|
283 |
req.data['ex'] = ValueError("whatever") |
|
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
284 |
viewsvreg = self.vreg['views'] |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
285 |
for vid, views in viewsvreg.items(): |
0 | 286 |
if vid[0] == '_': |
287 |
continue |
|
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
288 |
if rset.rowcount > 1 and vid in only_once_vids: |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
289 |
continue |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
290 |
views = [view for view in views |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
291 |
if view.category != 'startupview' |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
292 |
and not issubclass(view, NotificationView)] |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
293 |
if views: |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
294 |
try: |
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
295 |
view = viewsvreg.select_best(views, req, rset=rset) |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
296 |
if view.linkable(): |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
297 |
yield view |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
298 |
else: |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
299 |
not_selected(self.vreg, view) |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
300 |
# else the view is expected to be used as subview and should |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
301 |
# not be tested directly |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
302 |
except NoSelectableObject: |
0 | 303 |
continue |
304 |
||
305 |
def list_actions_for(self, rset): |
|
306 |
"""returns the list of actions that can be applied on `rset`""" |
|
307 |
req = rset.req |
|
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
308 |
for action in self.vreg['actions'].possible_objects(req, rset=rset): |
0 | 309 |
yield action |
310 |
||
311 |
def list_boxes_for(self, rset): |
|
312 |
"""returns the list of boxes that can be applied on `rset`""" |
|
313 |
req = rset.req |
|
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
314 |
for box in self.vreg['boxes'].possible_objects(req, rset=rset): |
0 | 315 |
yield box |
1605 | 316 |
|
0 | 317 |
def list_startup_views(self): |
318 |
"""returns the list of startup views""" |
|
319 |
req = self.request() |
|
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
320 |
for view in self.vreg['views'].possible_views(req, None): |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
321 |
if view.category == 'startupview': |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
322 |
yield view.id |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
323 |
else: |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
324 |
not_selected(self.vreg, view) |
1605 | 325 |
|
0 | 326 |
def _test_everything_for(self, rset): |
327 |
"""this method tries to find everything that can be tested |
|
328 |
for `rset` and yields a callable test (as needed in generative tests) |
|
329 |
""" |
|
330 |
propdefs = self.vreg['propertydefs'] |
|
331 |
# make all components visible |
|
332 |
for k, v in propdefs.items(): |
|
333 |
if k.endswith('visible') and not v['default']: |
|
334 |
propdefs[k]['default'] = True |
|
335 |
for view in self.list_views_for(rset): |
|
3764
034aa14b740a
drop _prepare_copy method from rset in favor of a more generic copy method
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3689
diff
changeset
|
336 |
backup_rset = rset.copy(rset.rows, rset.description) |
0 | 337 |
yield InnerTest(self._testname(rset, view.id, 'view'), |
338 |
self.view, view.id, rset, |
|
823
cb8ccbef8fa5
main template refactoring
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
563
diff
changeset
|
339 |
rset.req.reset_headers(), 'main-template') |
0 | 340 |
# We have to do this because some views modify the |
341 |
# resultset's syntax tree |
|
342 |
rset = backup_rset |
|
343 |
for action in self.list_actions_for(rset): |
|
3226
10f4f525044c
should now use _test_action, not bare action.url()
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2668
diff
changeset
|
344 |
yield InnerTest(self._testname(rset, action.id, 'action'), self._test_action, action) |
0 | 345 |
for box in self.list_boxes_for(rset): |
1773 | 346 |
yield InnerTest(self._testname(rset, box.id, 'box'), box.render) |
0 | 347 |
|
348 |
@staticmethod |
|
349 |
def _testname(rset, objid, objtype): |
|
350 |
return '%s_%s_%s' % ('_'.join(rset.column_types(0)), objid, objtype) |
|
1605 | 351 |
|
0 | 352 |
|
353 |
class AutomaticWebTest(WebTest): |
|
354 |
"""import this if you wan automatic tests to be ran""" |
|
355 |
## one each |
|
356 |
def test_one_each_config(self): |
|
357 |
self.auto_populate(1) |
|
1004
625e59773119
fix automatic test: ensure we actually have
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
563
diff
changeset
|
358 |
for rset in self.iter_automatic_rsets(limit=1): |
0 | 359 |
for testargs in self._test_everything_for(rset): |
360 |
yield testargs |
|
361 |
||
362 |
## ten each |
|
363 |
def test_ten_each_config(self): |
|
364 |
self.auto_populate(10) |
|
1004
625e59773119
fix automatic test: ensure we actually have
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
563
diff
changeset
|
365 |
for rset in self.iter_automatic_rsets(limit=10): |
0 | 366 |
for testargs in self._test_everything_for(rset): |
367 |
yield testargs |
|
1605 | 368 |
|
0 | 369 |
## startup views |
370 |
def test_startup_views(self): |
|
371 |
for vid in self.list_startup_views(): |
|
372 |
req = self.request() |
|
373 |
yield self.view, vid, None, req |
|
374 |
||
375 |
||
376 |
class RealDBTest(WebTest): |
|
377 |
||
378 |
def iter_individual_rsets(self, etypes=None, limit=None): |
|
379 |
etypes = etypes or unprotected_entities(self.schema, strict=True) |
|
380 |
for etype in etypes: |
|
381 |
rset = self.execute('Any X WHERE X is %s' % etype) |
|
382 |
for row in xrange(len(rset)): |
|
383 |
if limit and row > limit: |
|
384 |
break |
|
385 |
rset2 = rset.limit(limit=1, offset=row) |
|
386 |
yield rset2 |
|
387 |
||
2657
de974465d381
[appobject] kill VObject class, move base selector classes to appobject
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2650
diff
changeset
|
388 |
def not_selected(vreg, appobject): |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
389 |
try: |
2657
de974465d381
[appobject] kill VObject class, move base selector classes to appobject
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2650
diff
changeset
|
390 |
vreg._selected[appobject.__class__] -= 1 |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
391 |
except (KeyError, AttributeError): |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
392 |
pass |
1605 | 393 |
|
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
394 |
def vreg_instrumentize(testclass): |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
395 |
from cubicweb.devtools.apptest import TestEnvironment |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
396 |
env = testclass._env = TestEnvironment('data', configcls=testclass.configcls, |
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
397 |
requestcls=testclass.requestcls) |
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
398 |
for reg in env.vreg.values(): |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
399 |
reg._selected = {} |
2668
979c7ccb4a86
[testlib] take care of re-monkeypatching which'll cause infinite recursion error
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2657
diff
changeset
|
400 |
try: |
979c7ccb4a86
[testlib] take care of re-monkeypatching which'll cause infinite recursion error
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2657
diff
changeset
|
401 |
orig_select_best = reg.__class__.__orig_select_best |
979c7ccb4a86
[testlib] take care of re-monkeypatching which'll cause infinite recursion error
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2657
diff
changeset
|
402 |
except: |
979c7ccb4a86
[testlib] take care of re-monkeypatching which'll cause infinite recursion error
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2657
diff
changeset
|
403 |
orig_select_best = reg.__class__.select_best |
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
404 |
def instr_select_best(self, *args, **kwargs): |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
405 |
selected = orig_select_best(self, *args, **kwargs) |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
406 |
try: |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
407 |
self._selected[selected.__class__] += 1 |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
408 |
except KeyError: |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
409 |
self._selected[selected.__class__] = 1 |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
410 |
except AttributeError: |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
411 |
pass # occurs on reg used to restore database |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
412 |
return selected |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
413 |
reg.__class__.select_best = instr_select_best |
2668
979c7ccb4a86
[testlib] take care of re-monkeypatching which'll cause infinite recursion error
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2657
diff
changeset
|
414 |
reg.__class__.__orig_select_best = orig_select_best |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
415 |
|
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
416 |
def print_untested_objects(testclass, skipregs=('hooks', 'etypes')): |
2650
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
417 |
for regname, reg in testclass._env.vreg.iteritems(): |
18aec79ec3a3
R [vreg] important refactoring of the vregistry, moving behaviour to end dictionnary (and so leaving room for more flexibility ; keep bw compat ; update api usage in cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2234
diff
changeset
|
418 |
if regname in skipregs: |
534
1368c80276bc
refactor validator selection using a content type based dictionnary (which may be overriden by view id) + functions to instrumentize the registry to check what's tested and what's not
sylvain.thenault@logilab.fr
parents:
514
diff
changeset
|
419 |
continue |
2657
de974465d381
[appobject] kill VObject class, move base selector classes to appobject
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2650
diff
changeset
|
420 |
for appobjects in reg.itervalues(): |
de974465d381
[appobject] kill VObject class, move base selector classes to appobject
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2650
diff
changeset
|
421 |
for appobject in appobjects: |
de974465d381
[appobject] kill VObject class, move base selector classes to appobject
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2650
diff
changeset
|
422 |
if not reg._selected.get(appobject): |
de974465d381
[appobject] kill VObject class, move base selector classes to appobject
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2650
diff
changeset
|
423 |
print 'not tested', regname, appobject |