devtools/__init__.py
changeset 10644 c43e5dc41f8b
parent 10510 51321946da37
child 10651 9ca33768473c
child 10957 2fdf67ef3341
equal deleted inserted replaced
10643:cfded6d0da11 10644:c43e5dc41f8b
   624     def process_cache_entry(self, directory, dbname, db_id, entry):
   624     def process_cache_entry(self, directory, dbname, db_id, entry):
   625         backup_name = self._backup_name(db_id)
   625         backup_name = self._backup_name(db_id)
   626         if backup_name in self.helper.list_databases(self.cursor):
   626         if backup_name in self.helper.list_databases(self.cursor):
   627             return backup_name
   627             return backup_name
   628         return None
   628         return None
       
   629 
       
   630     def has_cache(self, db_id):
       
   631         backup_name = self._backup_name(db_id)
       
   632         return (super(PostgresTestDataBaseHandler, self).has_cache(db_id)
       
   633                 and backup_name in self.helper.list_databases(self.cursor))
   629 
   634 
   630     def init_test_database(self):
   635     def init_test_database(self):
   631         """initialize a fresh postgresql database used for testing purpose"""
   636         """initialize a fresh postgresql database used for testing purpose"""
   632         from cubicweb.server import init_repository
   637         from cubicweb.server import init_repository
   633         from cubicweb.server.serverctl import system_source_cnx, createdb
   638         from cubicweb.server.serverctl import system_source_cnx, createdb