Replace np links with www to fix 403 forbidden error.

This commit is contained in:
Michael Lazar committed 2016-02-04 15:33:50 -08:00
1 parent 20a17ec2b3
commit ff29429601
4 files changed
+2681 -1330

No files matched your search

File diff suppressed because it is too large. Load diff
+9 -1
View File
@@ -143,7 +143,7 @@ def test_content_submission_load_more_comments(reddit, terminal):
assert content.get(390)['type'] == 'Comment'
def test_content_submission_from_url(reddit, terminal):
def test_content_submission_from_url(reddit, oauth, refresh_token, terminal):
url = 'https://www.reddit.com/r/AskReddit/comments/2np694/'
SubmissionContent.from_url(reddit, url, terminal.loader)
@@ -159,6 +159,14 @@ def test_content_submission_from_url(reddit, terminal):
SubmissionContent.from_url(reddit, url[:-2], terminal.loader)
assert isinstance(terminal.loader.exception, praw.errors.NotFound)
# np.* urls should not raise a 403 error when logged into oauth
oauth.config.refresh_token = refresh_token
oauth.authorize()
url = 'https://np.reddit.com//r/LifeProTips/comments/441hsf//czmp112.json'
with terminal.loader():
SubmissionContent.from_url(reddit, url, terminal.loader)
assert not terminal.loader.exception
def test_content_subreddit_initialize(reddit, terminal):