cubicweb/skeleton/test/test_CUBENAME.py.tmpl
changeset 11057 0b59724cb3f2
parent 10214 88f60d4b9952
child 11070 1d115904f1ef
equal deleted inserted replaced
11052:058bb3dc685f 11057:0b59724cb3f2
       
     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 
       
    31 class DefaultTC(testlib.CubicWebTC):
       
    32     def test_something(self):
       
    33         self.skipTest('this cube has no test')
       
    34 
       
    35 
       
    36 if __name__ == '__main__':
       
    37     from logilab.common.testlib import unittest_main
       
    38     unittest_main()