def test_publish(self, mock_rmtree): step = PublishStep("foo") work_dir = os.path.join(self.working_dir, 'foo') step.working_dir = work_dir step.process_lifecycle = Mock() step._build_final_report = Mock() step.publish() self.assertTrue(step.process_lifecycle.called) self.assertTrue(step._build_final_report.called) mock_rmtree.assert_called_once_with(work_dir, ignore_errors=True)
def test_publish(self): # just test that process_lifecycle got called, that is where the functionality lives now step = PublishStep("foo") step.process_lifecycle = Mock() step.publish() self.assertTrue(step.process_lifecycle.called)