equal
deleted
inserted
replaced
|
1 # copyright %(year)s %(author)s, all rights reserved. |
|
2 # contact %(author-web-site)s -- mailto:%(author-email)s |
|
3 # |
|
4 %(long-license)s |
|
5 """%(distname)s automatic tests |
|
6 |
|
7 |
|
8 uncomment code below if you want to activate automatic test for your cube: |
|
9 |
|
10 .. sourcecode:: python |
|
11 |
|
12 from cubicweb.devtools.testlib import AutomaticWebTest |
|
13 |
|
14 class AutomaticWebTest(AutomaticWebTest): |
|
15 '''provides `to_test_etypes` and/or `list_startup_views` implementation |
|
16 to limit test scope |
|
17 ''' |
|
18 |
|
19 def to_test_etypes(self): |
|
20 '''only test views for entities of the returned types''' |
|
21 return set(('My', 'Cube', 'Entity', 'Types')) |
|
22 |
|
23 def list_startup_views(self): |
|
24 '''only test startup views of the returned identifiers''' |
|
25 return ('some', 'startup', 'views') |
|
26 """ |
|
27 |
|
28 from cubicweb.devtools import testlib |
|
29 |
|
30 class DefaultTC(testlib.CubicWebTC): |
|
31 def test_something(self): |
|
32 self.skip('this cube has no test') |
|
33 |
|
34 |
|
35 if __name__ == '__main__': |
|
36 from logilab.common.testlib import unittest_main |
|
37 unittest_main() |