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)
 def test_canCopyNewComments(self):
     item = JiraTrackerItem()
     commentsToCopy = ["comment1", "comment2"]
     item.withComments(commentsToCopy)
     self.assertEqual(item.comments('new'), commentsToCopy)
Пример #6
0
 def test_canCopyNewComments(self):
     item = JiraTrackerItem()
     commentsToCopy = ["comment1", "comment2"]
     item.withComments(commentsToCopy)
     self.assertEqual(item.comments('new'), commentsToCopy)