8000 Add unit test for create_comment · noellee/github3.py@d26e54a · GitHub
[go: up one dir, main page]

Skip to content

Commit d26e54a

Browse files
committed
Add unit test for create_comment
1 parent 061ff0e commit d26e54a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/unit/test_pulls.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ def test_close(self):
3434
}
3535
)
3636

37+
def test_create_comment(self):
38+
"""Show that a user can comment on a PR."""
39+
self.instance.create_comment('body')
40+
41+
self.instance.issue().session.post.assert_called_once_with(
42+
url_for('comments').replace('pulls', 'issues'),
43+
data={'body': 'body'}
44+
)
45+
3746
def test_create_review_comment(self):
3847
"""Verify the request to create a review comment on a PR diff."""
3948
self.instance.create_review_comment('body', 'sha', 'path', 6)

0 commit comments

Comments
 (0)
0