def test_canAddNewCommentToIssue(self): item = JiraTrackerItem() newComment = "Comments work now" item.addComment(newComment) comments = item.comments('new') existingComments = item.comments() self.assertEqual(comments[0], newComment) self.assertEqual(existingComments, [])
def test_canAddExistingCommentToIssue(self): item = JiraTrackerItem() existingComment = {'created':datetime.now(), 'author':"lwoydziak", 'body':"Comment 1"} item.addComment(existingComment, "existing") comments = item.comments('new') existingComments = item.comments() self.assertEqual(comments, []) self.assertEqual(existingComments[0], existingComment)
def test_canAddExistingCommentToIssue(self): item = JiraTrackerItem() existingComment = { 'created': datetime.now(), 'author': "lwoydziak", 'body': "Comment 1" } item.addComment(existingComment, "existing") comments = item.comments('new') existingComments = item.comments() self.assertEqual(comments, []) self.assertEqual(existingComments[0], existingComment)