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
def comments(self): return IssueComment.gets_by_issue_id(self.issue_id)