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)
示例#3
0
 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, [])
示例#4
0
 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)