def tearDown(self):
     b_api.fetch(self._get_backend()).clear_all()
     super(SqlPersistenceTest, self).tearDown()
     if self.db_location and os.path.isfile(self.db_location):
         os.unlink(self.db_location)
         self.db_location = None
示例#2
0
 def tearDown(self):
     b_api.fetch(self._get_backend()).clear_all()
     super(SqlPersistenceTest, self).tearDown()
     if self.db_location and os.path.isfile(self.db_location):
         os.unlink(self.db_location)
         self.db_location = None
示例#3
0
 def _get_backend(self):
     if not self.backend:
         return None
     return b_api.fetch(self.backend)
 def tearDown(self):
     b_api.fetch(self._get_backend()).clear_all()
     super(MemoryPersistenceTest, self).tearDown()
示例#5
0
def load(lb_id, backend='memory'):
    """Loads a given logbook (if it exists) from the given backend type."""
    return b_api.fetch(backend).logbook_get(lb_id)
示例#6
0
def load(lb_id, backend='memory'):
    """Loads a given logbook (if it exists) from the given backend type."""
    return b_api.fetch(backend).logbook_get(lb_id)