def _execute_test_action(self, manager, my_vcr, session_fixture): with my_vcr.use_cassette("stage/stage_cancel") as cass: if not len(cass.requests): with my_vcr.use_cassette("stage/schedule_with_instance"): # trigger pipeline, so it could be cancelled pipeline.PipelineManager(session_fixture).schedule_with_instance(self.PIPELINE_NAME) while manager.last(self.PIPELINE_NAME, self.STAGE_NAME).data.result != 'Unknown': time.sleep(1) return cass, manager.cancel()
def do_cancel(self, manager, cass, session_fixture): if not len(cass.requests): # trigger pipeline, so it could be cancelled pipeline.PipelineManager(session_fixture).schedule_with_instance( self.PIPELINE_NAME) while manager.last(self.PIPELINE_NAME, self.STAGE_NAME).data.result != 'Unknown': time.sleep(1) return manager.cancel()
def stage_instance_from_pipeline(self, my_vcr, session_fixture): with my_vcr.use_cassette("stage/stage_instance_from_pipeline"): return pipeline.PipelineManager(session_fixture).find('Consumer_Website').history()[0].stages()[0]
def mock_manager(self, mock_session): return pipeline.PipelineManager(session=mock_session)
def manager(session_fixture): return pipeline.PipelineManager(session=session_fixture)
def job_instance_from_pipeline(self, my_vcr, session_fixture): with my_vcr.use_cassette("job/job_instance_from_pipeline"): return pipeline.PipelineManager(session_fixture).find( self.PIPELINE_NAME).history()[0].stages()[0].jobs()[0]