def test_edit(self, _): self.reddit.read_only = False with self.recorder.use_cassette( 'TestComment.test_edit'): comment = Comment(self.reddit, 'd1616q2') comment.edit('New text') assert comment.body == 'New text'
def modify_exisiting_comment( comment: Comment, comment_string: str, post_tags: List[str] ) -> None: logger.debug(comment.body) if comment_string != comment.body: if len(post_tags) > 0: comment.edit(comment_string) logger.info(f"edited {comment_string}") else: comment.delete() logger.info(f"Comment deleted: {comment_string}") else: logger.info("Comment is the same as last time, not editing")
def test_edit(self, _): self.reddit.read_only = False with self.recorder.use_cassette("TestComment.test_edit"): comment = Comment(self.reddit, "d1616q2") comment.edit("New text") assert comment.body == "New text"