示例#1
0
    def test_flush(self):

        registry.set('test', 'foo')

        self.assertEqual('foo', registry.get('test'))
        self.assertNotEqual(0, len(registry.storage))

        registry.flush()

        self.assertEqual(0, len(registry.storage))
    def test_flush(self):

        registry.set('test', 'foo')

        self.assertEqual('foo', registry.get('test'))
        self.assertNotEqual(0, len(registry.storage))

        registry.flush()

        self.assertEqual(0, len(registry.storage))
示例#3
0
文件: data.py 项目: hickeroar/cahoots
 def tearDown(self):
     registry.flush()
示例#4
0
 def tearDown(self):
     registry.flush()
     self.dp = None
示例#5
0
 def tearDown(self):
     registry.flush()
     SimpleBayesStub.Tokenizer = None
     SimpleBayesStub.Languages = {}
     SimpleBayesStub.data_string = None
     ZipFileStub.called = []
示例#6
0
 def tearDown(self):
     registry.flush()
     self.dp = None
示例#7
0
 def tearDown(self):
     SQLite3Mock.reset()
     registry.flush()
     self.ap = None
示例#8
0
 def tearDown(self):
     registry.flush()
示例#9
0
 def tearDown(self):
     SQLite3Mock.reset()
     registry.flush()
     self.zcp = None
示例#10
0
 def tearDown(self):
     registry.flush()
     SimpleBayesStub.Tokenizer = None
     SimpleBayesStub.Languages = {}
     SimpleBayesStub.data_string = None
     ZipFileStub.called = []