Skip to content

Commit

Permalink
Use the proxy scheme in case it is different
Browse files Browse the repository at this point in the history
  • Loading branch information
skiedude committed Nov 22, 2024
1 parent 427e6e3 commit 7ee7bfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jira/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def _validate_self_self_url(self):
if self_parsed.netloc != server_parsed.netloc:
self.self = urlunparse(
ParseResult(
scheme=self_parsed.scheme,
scheme=server_parsed.scheme,
netloc=server_parsed.netloc,
path=self_parsed.path,
params=self_parsed.params,
Expand Down
4 changes: 2 additions & 2 deletions tests/resources/test_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def test_update_label_with_proxy(self):

labelarray = ["testLabel"]
fields = {"labels": labelarray}
issue.self = f"http://foo.bar/jira/rest/api/2/issue/{issue.id}"
issue.self = f"https://foo.bar/jira/rest/api/2/issue/{issue.id}"
issue.update(fields=fields)
self.assertEqual(issue.fields.labels, ["testLabel"])

Expand Down Expand Up @@ -395,7 +395,7 @@ def test_delete_with_proxy(self):
issuetype=self.test_manager.CI_JIRA_ISSUE,
)
key = issue.key
issue.self = f"http://foo.bar/jira/rest/api/2/issue/{issue.id}"
issue.self = f"https://foo.bar/jira/rest/api/2/issue/{issue.id}"
issue.delete()
self.assertRaises(JIRAError, self.jira.issue, key)

Expand Down

0 comments on commit 7ee7bfc

Please sign in to comment.