devtools/testlib.py
branchstable
changeset 4690 0cfb6b63f90b
parent 4689 4eb1f4490538
child 4719 aaed3f813ef8
equal deleted inserted replaced
4689:4eb1f4490538 4690:0cfb6b63f90b
    73     repo._type_source_cache = {}
    73     repo._type_source_cache = {}
    74     repo._extid_cache = {}
    74     repo._extid_cache = {}
    75     repo.querier._rql_cache = {}
    75     repo.querier._rql_cache = {}
    76     for source in repo.sources:
    76     for source in repo.sources:
    77         source.reset_caches()
    77         source.reset_caches()
       
    78     if resetschema:
       
    79         repo.set_schema(repo.config.load_schema(), resetvreg=resetvreg)
    78 
    80 
    79 
    81 
    80 # email handling, to test emails sent by an application ########################
    82 # email handling, to test emails sent by an application ########################
    81 
    83 
    82 MAILBOX = []
    84 MAILBOX = []
   141     `admpassword`, password of the admin user
   143     `admpassword`, password of the admin user
   142 
   144 
   143     """
   145     """
   144     appid = 'data'
   146     appid = 'data'
   145     configcls = devtools.ApptestConfiguration
   147     configcls = devtools.ApptestConfiguration
       
   148     reset_schema = reset_vreg = False # reset schema / vreg between tests
   146 
   149 
   147     @classproperty
   150     @classproperty
   148     def config(cls):
   151     def config(cls):
   149         """return the configuration object. Configuration is cached on the test
   152         """return the configuration object. Configuration is cached on the test
   150         class.
   153         class.
   211         cls.cnx.login = cls.admlogin
   214         cls.cnx.login = cls.admlogin
   212         cls.cnx.authinfo = {'password': cls.admpassword}
   215         cls.cnx.authinfo = {'password': cls.admpassword}
   213 
   216 
   214     @classmethod
   217     @classmethod
   215     def _refresh_repo(cls):
   218     def _refresh_repo(cls):
   216         refresh_repo(cls.repo)
   219         refresh_repo(cls.repo, cls.reset_schema, cls.reset_vreg)
   217 
   220 
   218     # global resources accessors ###############################################
   221     # global resources accessors ###############################################
   219 
   222 
   220     @property
   223     @property
   221     def schema(self):
   224     def schema(self):