Skip to content

Commit 7808bee

Browse files
Add: Remote link
1 parent a7e56b5 commit 7808bee

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
responses[
2+
'{"object": {"url": "https://confluence.atlassian-python.atlassian.net/display/Test", "title": "Unused link text", "status": {"resolved": false}}}'
3+
] = {
4+
"id": 10000,
5+
"self": "https://atlassian-python.atlassian.net/rest/api/2/issue/FOO-123/remotelink/10000",
6+
"application": {},
7+
}

tests/test_jira.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,16 @@ def test_delete_issue_property_not_found(self):
9292
self.jira.get_issue_property("FOO-123", "NotFoundBar1")
9393
with self.assertRaises(HTTPError):
9494
self.jira.get_issue_property("FOONotFound-123", "NotFoundBar1")
95+
96+
def test_post_issue_remotelink(self):
97+
"""Create a new remote link"""
98+
resp = self.jira.create_or_update_issue_remote_links(
99+
"FOO-123",
100+
"https://confluence.atlassian-python.atlassian.net/display/Test",
101+
"Unused link text",
102+
)
103+
self.assertEqual(resp["id"], 10000)
104+
self.assertEqual(
105+
resp["self"], "https://atlassian-python.atlassian.net/rest/api/2/issue/FOO-123/remotelink/10000"
106+
)
107+
self.assertDictEqual(resp['application'], {})

0 commit comments

Comments
 (0)