def scm_pipeline_run_with_no_open_release(another_project, another_scm_repository, scm_step_run_success_list_with_start_end_tags): application = models.Application(project=another_project, scm_repository=another_scm_repository, name='Application 2', slug='APP2') with username_on_model(models.Application, 'initial'): application.save() pipeline_yaml = '''stages: - release do-release: stage: release ''' scm_pipeline_run = models.SCMPipelineRun(application=application, pipeline_yaml=pipeline_yaml, steps_total=5, status="success", commit_hash='4015B57A143AEC5156FD1444A017A32137A3FD0F') with username_on_model(models.SCMPipelineRun, 'initial'): scm_pipeline_run.save() with username_on_model(models.SCMStepRun, 'initial'): for step in scm_step_run_success_list_with_start_end_tags: step.scm_pipeline_run = scm_pipeline_run step.save() return scm_pipeline_run
def another_application(another_project, another_scm_repository): application = models.Application(project=another_project, scm_repository=another_scm_repository, name='Application 2', slug='APP2') with username_on_model(models.Application, 'initial'): application.save() return application
def not_my_application(another_scm_repository, not_my_project): application = models.Application(project=not_my_project, scm_repository=another_scm_repository, name='Application 98', slug='APP98') with username_on_model(models.Application, 'initial'): application.save() return application
def my_other_application(my_other_project, my_other_scm_repository): application = models.Application(project=my_other_project, scm_repository=my_other_scm_repository, name="Application 2", slug="APP2") with username_on_model(models.Application, "initial"): application.save() return application
def my_application(project, scm_repository, not_my_application): application = models.Application(project=project, scm_repository=scm_repository, name="Application D", slug="APPD") with username_on_model(models.Application, "initial"): application.save() return application
def not_my_application(not_my_project, not_my_scm_repository): application = models.Application(project=not_my_project, scm_repository=not_my_scm_repository, name="Application Not mine", slug="APPNO") with username_on_model(models.Application, "initial"): application.save() return application
def deactivated_application(project, deactivated_scm_repository): application = models.Application(project=project, scm_repository=deactivated_scm_repository, name="Application Deactivated", slug="APPDeac") application.deleted = True with username_on_model(models.Application, "initial"): application.save() return application
def application(project, scm_repository): application = models.Application(project=project, scm_repository=scm_repository, name='Application D', slug='APPD') with username_on_model(models.Application, 'initial'): application.save() return application