-
-
Notifications
You must be signed in to change notification settings - Fork 890
implemented CommentProperty #1937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
implemented CommentProperty #1937
Conversation
I think we can add a test similar to your example in the description in a file like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent PR, let's get the pipeline passing and a test in
Hello @adehad
do you mean something like diff --git a/tests/resources/test_comment.py b/tests/resources/test_comment.py
index 1dafc84..515c768 100644
--- a/tests/resources/test_comment.py
+++ b/tests/resources/test_comment.py
@@ -9,9 +9,10 @@ class CommentTests(JiraTestCase):
self.issue_1_key = self.test_manager.project_b_issue1
self.issue_2_key = self.test_manager.project_b_issue2
self.issue_3_key = self.test_manager.project_b_issue3
+ self.issue_4_key = self.test_manager.project_b_issue4
def tearDown(self) -> None:
- for issue in [self.issue_1_key, self.issue_2_key, self.issue_3_key]:
+ for issue in [self.issue_1_key, self.issue_2_key, self.issue_3_key, self.issue_4_key]:
for comment in self.jira.comments(issue):
comment.delete()
@@ -80,3 +81,10 @@ class CommentTests(JiraTestCase):
comment.update(body="updated! without notification", notify=False)
assert comment.body == "updated! without notification"
comment.delete()
+
+ def test_comment_property(self):
+ comment = self.jira.add_comment(self.issue_4_key, "comment for property test")
+ comment_prop_data = {'internal': 'true'}
+ self.jira.add_comment_property(comment, 'sd.public.comment', comment_prop_data)
+ assert self.jira.comment_property(comment, 'sd.public.comment').value.internal.lower() == 'true'
+ comment.delete() |
@zerwes Yes exactly something similar to this. I also suggest to add an additional assertion with an You don't need to create the issue 4 at the test setup level, reusing an existing issue should be fine. |
here we go: 37d7247 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent test, minor comment regarding the issue used.
We can ignore the docs build failures that's unrelated.
handle comment properties analogue to the issue properties
example