a *Na @sRdZddlZddlZddlmZejddZddZdd Zd d Z d d Z dS)z: GitLab API: https://docs.gitlab.com/ce/api/services.html N)ProjectServiceccsdddddddddddddddddddd}tjd d }|jtjd |gd d d|jtjd |d d d|jtjd|d d dt|}d |d<|jtjd|d d d|VWdn1s0YdS)Ni8zPipelines emailspipelines-emailz2019-01-14T08:46:43.637+01:00z2019-07-01T14:10:36.156+02:00T)idtitleZslugZ created_atZ updated_atactiveZ commit_events push_events issues_eventsZconfidential_issues_eventsZmerge_requests_eventsZtag_push_eventsZ note_eventsZconfidential_note_eventsZpipeline_eventsZwiki_page_eventsZ job_eventsZcomment_on_event_enabledZ project_idF)Zassert_all_requests_are_firedz+http://localhost/api/v4/projects/1/serviceszapplication/json)methodurljson content_typestatusz;http://localhost/api/v4/projects/1/services/pipelines-emailr ) responsesZ RequestsMockaddGETdictPUT)contentZrspsZupdated_contentr{/private/var/folders/js/6pj4vh5d4zd0k6bxv74qrbhr0000gr/T/pip-target-22xwyzbs/lib/python/tests/unit/objects/test_services.py resp_service shrcCsJ|j}t|tsJt|dts*J|djs8J|djsFJdSNr)serviceslist isinstancerrrprojectrrrrrtest_list_active_servicesEs  rcCs.|j}t|tsJt|dts*JdSr)r availablerrstrrrrrtest_list_available_servicesMs r"cCs,|jd}t|tsJ|jdus(JdS)NrT)rgetrrrrrZservicerrrtest_get_serviceSs r%cCs,|jd}d|_||jdus(JdS)NrF)rr#r saver$rrrtest_update_serviceYs r') __doc__ZpytestrZgitlab.v4.objectsrZfixturerrr"r%r'rrrrs  9