a *Na @sdZddlZddlZddlZddlmZmZmZejddZ ejddZ ejdd Z d d Z d d Z ddZddZddZdS)z8 GitLab API: https://docs.gitlab.com/ce/api/issues.html N)GroupIssuesStatisticsIssuesStatisticsProjectIssuesStatisticsccs\ddddddg}t,}|jtjd|ddd |VWdn1sN0YdS) Nnamerid other_namezhttp://localhost/api/v4/issuesapplication/jsonmethodurljson content_typestatus responses RequestsMockaddGETcontentrspsry/private/var/folders/js/6pj4vh5d4zd0k6bxv74qrbhr0000gr/T/pip-target-22xwyzbs/lib/python/tests/unit/objects/test_issues.pyresp_list_issuess rccsNt2}|jtjddddddd|VWdn1s@0YdS)Nz http://localhost/api/v4/issues/1rrrr r r r)rrrrresp_get_issues rccsbddddddii}t2}|jtjtd|dd d |VWdn1sT0YdS) N statisticscounts)allclosedZopenedz@http://localhost/api/v4/((groups|projects)/1/)?issues_statisticsr r r )rrrrrecompilerrrrresp_issue_statistics,s  r(cCs2|j}|djdksJ|djdks.JdS)Nrr r )issueslistrr)glrdatarrrtest_list_issues=s r-cCs,|jd}|jdksJ|jdks(JdS)Nrr)r)getrr)r+rissuerrrtest_get_issueCs r0cCs2|j}t|tsJ|jdddks.JdSNr r$r!)issues_statisticsr. isinstancerr)r+r(rrrrtest_get_issues_statisticsIs r4cCs2|j}t|tsJ|jdddks.JdSr1)r2r.r3rr)groupr(rrrr test_get_group_issues_statisticsOs r6cCsL|j}t|tsJ|jdddks.J|j}|j|jksHJdSr1)r2r.r3rrZissuesstatistics)projectr(r deprecatedrrr"test_get_project_issues_statisticsUs   r9)__doc__r&ZpytestrZgitlab.v4.objectsrrrZfixturerrr(r-r0r4r6r9rrrrs