def testGetExpired(self):
        def checkState(_):
            self.assertEquals(self.s.deleteQueue, { 100 : {}})
            self.assertEquals(self.s.hash, {})

        return ExpirableStorageTestMixin.testGetExpired(self).addCallback(checkState)
 def setUp(self):
     ExpirableStorageTestMixin.setUp(self)
     self.s = DomainMemoryStorage()
     self.s.bind(getDefaultDomain(), 'testMemory')
 def tearDown(self):
     ExpirableStorageTestMixin.tearDown(self)
 def setUp(self):
     ExpirableStorageTestMixin.setUp(self)
     self.s = MemoryStorage(cleanupInterval=0)
Exemple #5
0
 def tearDown(self):
     shutil.rmtree(config.storage.dbm.path)
     ExpirableStorageTestMixin.tearDown(self)
Exemple #6
0
 def setUp(self):
     if not os.path.exists(config.storage.dbm.path):
         os.makedirs(config.storage.dbm.path)
     ExpirableStorageTestMixin.setUp(self)
     self.s = DomainedDBMStorage()
     self.s.bind(getDefaultDomain(), 'testDBM')
Exemple #7
0
 def setUp(self):
     if not os.path.exists(config.storage.dbm.path):
         os.makedirs(config.storage.dbm.path)
     ExpirableStorageTestMixin.setUp(self)
     self.s = DBMStorage('testing', 't')