示例#1
0
    def test_get_comment(self):
        i = Issue.add('test', 'test description', 'test', 'assignee')
        c = IssueComment.add(i.id, 'content', 'test')
        c = IssueComment.get(c.id)
        assert isinstance(c, IssueComment)
        assert c.issue_id == i.id
        assert c.content == 'content'
        assert c.author_id == 'test'

        c = IssueComment.add(i.id, 'content', 'test')
        cs = IssueComment.gets_by_issue_id(i.id)
        assert all([isinstance(t, IssueComment) for t in cs])
        assert len(cs) == 2
示例#2
0
    def test_get_comment(self):
        i = Issue.add('test', 'test description', 'test', 'assignee')
        c = IssueComment.add(i.id, 'content', 'test')
        c = IssueComment.get(c.id)
        assert isinstance(c, IssueComment)
        assert c.issue_id == i.id
        assert c.content == 'content'
        assert c.author_id == 'test'

        c = IssueComment.add(i.id, 'content', 'test')
        cs = IssueComment.gets_by_issue_id(i.id)
        assert all([isinstance(t, IssueComment) for t in cs])
        assert len(cs) == 2
示例#3
0
文件: issue.py 项目: leeccong/code
 def comments(self):
     return IssueComment.gets_by_issue_id(self.issue_id)
示例#4
0
 def comments(self):
     return IssueComment.gets_by_issue_id(self.issue_id)