def _q_lookup(self, request, comment_id): comment = CommitLineComment.get(comment_id) if not comment: raise TraversalError("Unable to find comment %s" % comment_id) else: self.linecomment = comment return self
def _q_lookup(self, request, comment_id): comment = CommitLineComment.get(comment_id) if not comment: raise TraversalError( "Unable to find comment %s" % comment_id) else: self.linecomment = comment return self
def test_update_comment(self): # commit c1 = CommitLineComment.add(TARGET_ID, FROM_SHA, TO_SHA, OLD_PATH, NEW_PATH, FROM_OID, TO_OID, 20, 30, AUTHOR, CONTENT1) assert c1.content == CONTENT1 c1.update(CONTENT2) c1 = CommitLineComment.get(c1.id) assert c1.content == CONTENT2 # pull c2 = PullLineComment.add(TARGET_ID, FROM_SHA, TO_SHA, OLD_PATH, NEW_PATH, FROM_OID, TO_OID, 20, 30, AUTHOR, CONTENT2) assert c2.content == CONTENT2 c2.update(CONTENT_ZH) c2 = CommitLineComment.get(c2.id) assert c2.content == CONTENT_ZH