devtools/__init__.py
changeset 10644 c43e5dc41f8b
parent 10510 51321946da37
child 10651 9ca33768473c
child 10957 2fdf67ef3341
--- a/devtools/__init__.py	Tue Sep 22 14:20:02 2015 +0200
+++ b/devtools/__init__.py	Fri Jul 24 09:57:08 2015 +0200
@@ -627,6 +627,11 @@
             return backup_name
         return None
 
+    def has_cache(self, db_id):
+        backup_name = self._backup_name(db_id)
+        return (super(PostgresTestDataBaseHandler, self).has_cache(db_id)
+                and backup_name in self.helper.list_databases(self.cursor))
+
     def init_test_database(self):
         """initialize a fresh postgresql database used for testing purpose"""
         from cubicweb.server import init_repository