-
Notifications
You must be signed in to change notification settings - Fork 676
Expand file tree
/
Copy pathtest_epics.py
More file actions
34 lines (23 loc) · 908 Bytes
/
test_epics.py
File metadata and controls
34 lines (23 loc) · 908 Bytes
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
import pytest
pytestmark = pytest.mark.gitlab_premium
def test_epics(group):
epic = group.epics.create({"title": "Test epic"})
epic.title = "Fixed title"
epic.labels = ["label1", "label2"]
epic.save()
epic = group.epics.get(epic.iid)
assert epic.title == "Fixed title"
assert epic.labels == ["label1", "label2"]
assert group.epics.list()
def test_epic_issues(epic, issue):
assert not epic.issues.list()
# FYI: Creating an issue causes a note to be created
epic_issue = epic.issues.create({"issue_id": issue.id})
assert epic.issues.list()
# FYI: Deleting an issue causes a note to be created
epic_issue.delete()
def test_epic_notes(epic):
notes = epic.notes.list(get_all=True)
epic.notes.create({"body": "Test note"})
new_notes = epic.notes.list(get_all=True)
assert len(new_notes) == (len(notes) + 1), f"{new_notes} {notes}"