예제 #1
0
 def test_cleanup(self):
     """
     TransportHelper.cleanup() should call .cleanup() on its
     PersistenceHelper and WorkerHelper.
     """
     tx_helper = TransportHelper(None)
     tx_helper.persistence_helper = FakeCleanupCheckHelper()
     tx_helper.worker_helper = FakeCleanupCheckHelper()
     self.assertEqual(tx_helper.persistence_helper.cleaned_up, False)
     self.assertEqual(tx_helper.worker_helper.cleaned_up, False)
     success_result_of(tx_helper.cleanup())
     self.assertEqual(tx_helper.persistence_helper.cleaned_up, True)
     self.assertEqual(tx_helper.worker_helper.cleaned_up, True)
예제 #2
0
 def test_cleanup(self):
     """
     ApplicationHelper.cleanup() should call .cleanup() on its
     PersistenceHelper and WorkerHelper.
     """
     app_helper = ApplicationHelper(None)
     app_helper.persistence_helper = FakeCleanupCheckHelper()
     app_helper.worker_helper = FakeCleanupCheckHelper()
     self.assertEqual(app_helper.persistence_helper.cleaned_up, False)
     self.assertEqual(app_helper.worker_helper.cleaned_up, False)
     success_result_of(app_helper.cleanup())
     self.assertEqual(app_helper.persistence_helper.cleaned_up, True)
     self.assertEqual(app_helper.worker_helper.cleaned_up, True)
예제 #3
0
 def test_cleanup(self):
     """
     DispatcherHelper.cleanup() should call .cleanup() on its
     PersistenceHelper and WorkerHelper.
     """
     disp_helper = DispatcherHelper(None)
     disp_helper.persistence_helper = FakeCleanupCheckHelper()
     disp_helper.worker_helper = FakeCleanupCheckHelper()
     self.assertEqual(disp_helper.persistence_helper.cleaned_up, False)
     self.assertEqual(disp_helper.worker_helper.cleaned_up, False)
     success_result_of(disp_helper.cleanup())
     self.assertEqual(disp_helper.persistence_helper.cleaned_up, True)
     self.assertEqual(disp_helper.worker_helper.cleaned_up, True)
예제 #4
0
 def test_cleanup(self):
     """
     ApplicationHelper.cleanup() should call .cleanup() on its
     PersistenceHelper and WorkerHelper.
     """
     app_helper = ApplicationHelper(None)
     app_helper.persistence_helper = FakeCleanupCheckHelper()
     app_helper.worker_helper = FakeCleanupCheckHelper()
     self.assertEqual(app_helper.persistence_helper.cleaned_up, False)
     self.assertEqual(app_helper.worker_helper.cleaned_up, False)
     success_result_of(app_helper.cleanup())
     self.assertEqual(app_helper.persistence_helper.cleaned_up, True)
     self.assertEqual(app_helper.worker_helper.cleaned_up, True)