devtools/testlib.py
branchstable
changeset 5229 67dbd07a05f3
parent 5175 6efb7a7ae570
child 5238 31c12863fd9d
child 5247 3c8f6e6014f4
child 5267 7bac6791bbc2
equal deleted inserted replaced
5228:369b8aff535b 5229:67dbd07a05f3
   128 
   128 
   129 # base class for cubicweb tests requiring a full cw environments ###############
   129 # base class for cubicweb tests requiring a full cw environments ###############
   130 
   130 
   131 class CubicWebTC(TestCase):
   131 class CubicWebTC(TestCase):
   132     """abstract class for test using an apptest environment
   132     """abstract class for test using an apptest environment
   133 
       
   134     attributes:
   133     attributes:
   135     `vreg`, the vregistry
   134 
   136     `schema`, self.vreg.schema
   135     * `vreg`, the vregistry
   137     `config`, cubicweb configuration
   136     * `schema`, self.vreg.schema
   138     `cnx`, dbapi connection to the repository using an admin user
   137     * `config`, cubicweb configuration
   139     `session`, server side session associated to `cnx`
   138     * `cnx`, dbapi connection to the repository using an admin user
   140     `app`, the cubicweb publisher (for web testing)
   139     * `session`, server side session associated to `cnx`
   141     `repo`, the repository object
   140     * `app`, the cubicweb publisher (for web testing)
   142 
   141     * `repo`, the repository object
   143     `admlogin`, login of the admin user
   142     * `admlogin`, login of the admin user
   144     `admpassword`, password of the admin user
   143     * `admpassword`, password of the admin user
   145 
   144 
   146     """
   145     """
   147     appid = 'data'
   146     appid = 'data'
   148     configcls = devtools.ApptestConfiguration
   147     configcls = devtools.ApptestConfiguration
   149     reset_schema = reset_vreg = False # reset schema / vreg between tests
   148     reset_schema = reset_vreg = False # reset schema / vreg between tests