def test_attributes(self): with self.recorder.use_cassette('TestComment.test_attributes'): comment = Comment(self.reddit, 'cklhv0f') assert comment.author == 'bboe' assert comment.body.startswith('Yes it does.') assert not comment.is_root assert comment.permalink(fast=True) == '/comments/2gmzqe//cklhv0f' assert comment.submission == '2gmzqe'
def test_permalink(self): with self.recorder.use_cassette('TestComment.test_permalink'): comment = Comment(self.reddit, 'cklhv0f') assert comment.permalink() == ('/r/redditdev/comments/2gmzqe/' 'praw_https_enabled_praw_testing_' 'needed/cklhv0f')