Repair failing test and fix %U bug

Fix SubredditPage._url_str parsing the wrong URL for 'external' URL
types. Make urlparse import agnostic between python2 and 3.
This commit is contained in:
John Helmert
2019-07-25 21:23:17 -05:00
parent 878a510185
commit 88a75492a4
3 changed files with 999 additions and 3 deletions

View File

@@ -694,7 +694,7 @@ def test_subreddit_page__url_str(config, terminal, subreddit_page):
data['url_type'] = 'external'
assert subreddit_page._url_str(data) == 'https://www.reddit.com/r/AskReddit/comments/99eh6b/without_saying_what_the_category_is_what_are_your/'
assert subreddit_page._url_str(data) == 'www.reddit.com'
def test_subreddit_page__url_attr(config, terminal, subreddit_page):