示例#1
0
 def testRevertingDocuments(self):
     old = tools.get_current_initials()
     feat.initial_data(SomeDocument)
     current = tools.get_current_initials()
     self.assertEqual(len(old) + 1, len(current))
     tools.reset_documents(old)
     current = tools.get_current_initials()
     self.assertEqual(len(old), len(current))
示例#2
0
 def tearDown(self):
     yield SimulationTest.tearDown(self)
     current = tools.get_current_initials()
     self.assertFalse(isinstance(current[-1], SomeDocument))
示例#3
0
文件: common.py 项目: f3at/feat
    def __init__(self, *args, **kwargs):
        common.TestCase.__init__(self, *args, **kwargs)
        initial_documents = tools.get_current_initials()

        self.addCleanup(tools.reset_documents, initial_documents)