a *Na6@sdZddlZddlZddlmZmZddddddd dd d dd d ddddddddddddZddddddddddddddddddddgdgdZejddZ ejd d!Z ejd"d#Z ejd$d%Z d&d'Z d(d)Zd*d+Zd,d-ZdS).z; GitLab API: https://docs.gitlab.com/ee/api/pipelines.html N)ProjectPipelineProjectPipelineTestReport.pendingmasterZ(a91957a858320c0e17f3a0eca7cfacbff50ea29aFZ AdministratorrootactivezPhttp://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identiconzhttp://localhost:3000/root)nameusernameidstateZ avatar_urlweb_urlz2016-08-11T11:28:34.085Zz2016-08-11T11:32:35.169Zz2016-08-11T11:32:35.145Zg{Gz?z(https://example.com/foo/bar/pipelines/46)r Z project_idstatusrefshaZ before_shatagZ yaml_errorsuserZ created_atZ updated_atZ started_atZ finished_atZ committed_atdurationZqueued_durationZcoveragerSecuresuccessz2Security Reports can create an auto-remediation MRZvulnerability_management_spec)rr classnameZexecution_timeZ system_outputZ stack_trace)r total_time total_count success_count failed_count skipped_count error_countZ test_cases)rrrrrr test_suitesccsHt,}|jtjdtddd|VWdn1s:0YdS)Nz.http://localhost/api/v4/projects/1/pipelines/1application/jsonmethodurljson content_typer) responses RequestsMockaddGETpipeline_contentZrspsr-|/private/var/folders/js/6pj4vh5d4zd0k6bxv74qrbhr0000gr/T/pip-target-22xwyzbs/lib/python/tests/unit/objects/test_pipelines.pyresp_get_pipelineEs r/ccsHt,}|jtjdtddd|VWdn1s:0YdS)Nz5http://localhost/api/v4/projects/1/pipelines/1/cancelr r"r'r(r)POSTr+r,r-r-r.resp_cancel_pipelineRs r3ccsHt,}|jtjdtddd|VWdn1s:0YdS)Nz4http://localhost/api/v4/projects/1/pipelines/1/retryr r0r"r1r,r-r-r.resp_retry_pipeline_s r4ccsHt,}|jtjdtddd|VWdn1s:0YdS)Nz:http://localhost/api/v4/projects/1/pipelines/1/test_reportr r!r")r'r(r)r*test_report_contentr,r-r-r.resp_get_pipeline_test_reportls r6cCs,|jd}t|tsJ|jdks(JdS)Nrr) pipelinesget isinstancerr)projectr/pipeliner-r-r.test_get_project_pipelineys r<cCs,|jjddd}|}|ddks(JdSNrTZlazyrr)r7r8cancel)r:r3r;outputr-r-r.test_cancel_project_pipelinesrAcCs,|jjddd}|}|ddks(JdSr=)r7r8retry)r:r4r;r@r-r-r.test_retry_project_pipelinesrCcCsP|jjddd}|j}t|ts(J|jdks6J|jdddksLJdS)NrTr>rrr r)r7r8 test_reportr9rrr)r:r6r;rDr-r-r.%test_get_project_pipeline_test_reports  rE)__doc__Zpytestr'Zgitlab.v4.objectsrrr+r5Zfixturer/r3r4r6r<rArCrEr-r-r-r.s