ListRedditsContent.from_user method replaced with from_func; updated tests accordingly
This commit is contained in:
@@ -220,14 +220,11 @@ def subreddit_page(reddit, terminal, config, oauth):
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def reddits(reddit, terminal, config, oauth):
|
||||
return reddit.get_popular_subreddits()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def list_reddits_page(reddit, name, reddits, terminal, config, oauth):
|
||||
def list_reddits_page(reddit, terminal, config, oauth):
|
||||
title = 'Popular Subreddits'
|
||||
func = reddit.get_popular_subreddits
|
||||
with terminal.loader():
|
||||
page = ListRedditsPage(reddit, name, reddits, terminal, config, oauth)
|
||||
page = ListRedditsPage(reddit, title, func, terminal, config, oauth)
|
||||
assert terminal.loader.exception is None
|
||||
page.draw()
|
||||
return page
|
||||
|
||||
Reference in New Issue
Block a user