FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/tests/unit/objects/test_iterations.py at v8.6.0 · python-gitlab/python-gitlab · GitHub
python-gitlab
python-gitlab
Repository navigation
Code
Issues
16
(16)
Pull requests
15
(15)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab
/
tests
/
unit
/
objects
/
test_iterations.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (38 loc) · 1.18 KB
Breadcrumbs
python-gitlab
/
tests
/
unit
/
objects
/
test_iterations.py
Copy path
File metadata and controls
47 lines (38 loc) · 1.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""
GitLab API: https://docs.gitlab.com/ee/api/iterations.html
"""
import
re
import
pytest
import
responses
iterations_content
=
[
{
"id"
:
53
,
"iid"
:
13
,
"group_id"
:
5
,
"title"
:
"Iteration II"
,
"description"
:
"Ipsum Lorem ipsum"
,
"state"
:
2
,
"created_at"
:
"2020-01-27T05:07:12.573Z"
,
"updated_at"
:
"2020-01-27T05:07:12.573Z"
,
"due_date"
:
"2020-02-01"
,
"start_date"
:
"2020-02-14"
,
"web_url"
:
"http://gitlab.example.com/groups/my-group/-/iterations/13"
,
}
]
@
pytest
.
fixture
def
resp_iterations_list
():
with
responses
.
RequestsMock
()
as
rsps
:
rsps
.
add
(
method
=
responses
.
GET
,
url
=
re
.
compile
(
r"http://localhost/api/v4/(groups|projects)/1/iterations"
),
json
=
iterations_content
,
content_type
=
"application/json"
,
status
=
200
,
)
yield
rsps
def
test_list_group_iterations
(
group
,
resp_iterations_list
):
iterations
=
group
.
iterations
.
list
()
assert
iterations
[
0
].
group_id
==
5
def
test_list_project_iterations
(
project
,
resp_iterations_list
):
iterations
=
project
.
iterations
.
list
()
assert
iterations
[
0
].
group_id
==
5
Back
|
FazBrowse Home
|
New Git URL